Compare commits

..

22 Commits

Author SHA1 Message Date
syuilo
c8c4ec6ad4 5.22.0 2018-08-11 21:35:22 +09:00
syuilo
c9ee737078 Fix bug 2018-08-11 21:34:12 +09:00
syuilo
ebc2cca0b4 New Crowdin translations (#2158) 2018-08-11 21:29:07 +09:00
syuilo
fc94df06eb New Crowdin translations (#2157) 2018-08-11 21:13:38 +09:00
syuilo
4a5e145048 Add new reaction: rip 😇 2018-08-11 21:08:34 +09:00
syuilo
be68f42220 Implement messaging/messages/read 2018-08-11 21:01:39 +09:00
syuilo
7942aa677f Update doc 2018-08-11 21:01:26 +09:00
syuilo
2fcf9288a5 Refactoring 2018-08-11 20:53:03 +09:00
MeiMei
9bc17974f2 未利用時はTwitterでログインを表示しない (#2156) 2018-08-11 20:20:35 +09:00
MeiMei
a8f142096c Cache failed url-preview (apply to proxy/client) (#2154) 2018-08-11 18:04:59 +09:00
syuilo
3c90abfb96 5.21.0 2018-08-11 12:24:16 +09:00
greenkeeper[bot]
12037fab9b fix(package): update @types/node to version 10.5.8 (#2152) 2018-08-11 12:21:42 +09:00
greenkeeper[bot]
73cc425093 fix(package): update request to version 2.88.0 (#2151) 2018-08-11 12:21:30 +09:00
syuilo
5c97da935d New Crowdin translations (#2150) 2018-08-11 12:21:18 +09:00
syuilo
a52c588f49 Merge branch 'master' of https://github.com/syuilo/misskey 2018-08-11 00:49:31 +09:00
syuilo
fa469725c7 Add doc 2018-08-11 00:49:29 +09:00
greenkeeper[bot]
a1f0cb1bc7 fix(package): update summaly to version 2.1.2 (#2149) 2018-08-11 00:44:26 +09:00
greenkeeper[bot]
fbbd33ded2 fix(package): update file-type to version 9.0.0 2018-08-10 20:44:03 +09:00
greenkeeper[bot]
9658e2b3fb fix(package): update element-ui to version 2.4.6 2018-08-10 20:43:56 +09:00
MeiMei
3d10b19727 Fix Powered by <b>Misskey</b>. (#2140) 2018-08-10 20:11:54 +09:00
syuilo
ab7725ff69 良い感じにした 2018-08-10 14:33:34 +09:00
syuilo
6372451d17 Fix bug 2018-08-10 14:15:12 +09:00
33 changed files with 245 additions and 119 deletions

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Glückwunsch!"
angry: "Wütend"
confused: "Verwirrt"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Was machst du gerade?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Congrats!"
angry: "Angry"
confused: "Confused"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "What are you doing?"

View File

@@ -39,7 +39,7 @@ common:
weeks_ago: "Hace {} semana(s)"
months_ago: "Hace {} mes(es)"
years_ago: "Hace {} año(s)"
month-and-day: "{month}月 {day}日"
month-and-day: "{day} de {month}"
trash: "Papelera"
weekday-short:
sunday: "domingo"
@@ -66,6 +66,7 @@ common:
congrats: "felicidades"
angry: "enfadado"
confused: "confundido"
rip: "RIP"
pudding: "Chafado"
note-placeholders:
a: "¿Qué haces?"
@@ -235,13 +236,13 @@ common/views/components/messaging-room.vue:
no-history: "El historial se ha acabado"
resize-form: "Arrastra para redimensionar"
new-message: "Nuevo mensaje"
only-one-file-attached: "メッセージに添付できるのはひとつのファイルのみです"
only-one-file-attached: "Un único archivo se puede conectar al mensaje"
common/views/components/messaging-room.form.vue:
input-message-here: "Escribe el mensaje aquí"
send: "Enviar"
attach-from-local: "Adjunta ficheros desde tu PC"
attach-from-drive: "Adjunta ficheros desde tu disco"
only-one-file-attached: "メッセージに添付できるのはひとつのファイルのみです"
only-one-file-attached: "Un único archivo se puede conectar al mensaje"
common/views/components/messaging-room.message.vue:
is-read: "Leer"
deleted: "El mensaje se ha borrado"
@@ -378,56 +379,56 @@ common/views/widgets/tips.vue:
tips-line10: "Usando el accesorio de Máquina del Tiempo puedes encontrar publicaciones antiguas"
tips-line11: "Puedes resaltar publicaciones en la página de usuario haciendo click en \"...\""
tips-line13: "Todos los archivos añadidos a la publicación se han guardado en tu unidad."
tips-line14: "ホームのカスタマイズ中、ウィジェットを右クリックしてデザインを変更できます"
tips-line17: "「**」でテキストを囲むと**強調表示**されます"
tips-line19: "いくつかのウィンドウはブラウザの外に切り離すことができます"
tips-line20: "カレンダーウィジェットのパーセンテージは、経過の割合を示しています"
tips-line21: "APIを利用してbotの開発なども行えます"
tips-line23: "まゆかわいいよまゆ"
tips-line24: "Misskeyは2014年にサービスを開始しました"
tips-line25: "対応ブラウザではMisskeyを開いていなくても通知を受け取れます"
tips-line14: "Cuando personalizas el inicio puedas dar click derecho a un accesorio y cambiar el diseño."
tips-line17: "Al colocar ** delante y luego del texto, lo estarás destacando en negrillas"
tips-line19: "Algunas ventanas pueden ser separadas fuera del navegador"
tips-line20: "El porcentaje mostrando en el accesorio de calendario indica el porcentaje de tiempo transcurrido."
tips-line21: "También puedes usar la API para desarrollar tus propios bots."
tips-line23: "Mayu is tan bonito con sus cejas."
tips-line24: "Misskey inició en 2014."
tips-line25: "Puedes recibir notificaciones incluso si Misskey no está abierto en un navegador compatible."
common/views/pages/follow.vue:
signed-in-as: "{}としてサインイン中"
following: "フォロー中"
follow: "フォロー"
request-pending: "フォロー許可待ち"
follow-request: "フォロー申請"
signed-in-as: "Autenticado como {}"
following: "Siguiendo"
follow: "Seguir"
request-pending: "Solicitud pendiente"
follow-request: "Solicitar suscripción"
desktop:
banner-crop-title: "バナーとして表示する部分を選択"
banner: "バナー"
uploading-banner: "新しいバナーをアップロードしています"
banner-updated: "バナーを更新しました"
choose-banner: "バナーにする画像を選択"
avatar-crop-title: "アバターとして表示する部分を選択"
avatar: "アバター"
uploading-avatar: "新しいアバターをアップロードしています"
avatar-updated: "アバターを更新しました"
choose-avatar: "アバターにする画像を選択"
banner-crop-title: "Corta la parte que aparece como un banner"
banner: "Banner"
uploading-banner: "Cargando un nuevo banner"
banner-updated: "Banner actualizado"
choose-banner: "Escoge un banner"
avatar-crop-title: "Corta la parte que aparece como un avatar"
avatar: "Avatar"
uploading-avatar: "Cargando un nuevo avatar"
avatar-updated: "Avatar actualizado"
choose-avatar: "Escoge una imagen de avatar"
desktop/views/components/activity.chart.vue:
total: "Black ... Total"
notes: "Blue ... Notes"
replies: "Red ... Replies"
renotes: "Green ... Renotes"
total: "Negro ... Total"
notes: "Azul ... Notas"
replies: "Rojo ... Respuestas"
renotes: "Verde ... Republicaciones"
desktop/views/components/activity.vue:
title: "アクティビティ"
toggle: "表示を切り替え"
title: "Actividad"
toggle: "Alternar vistas"
desktop/views/components/calendar.vue:
title: "{1} {2}"
prev: "前の月"
next: "次の月"
go: "クリックして時間遡行"
title: "{1} / {2}"
prev: "Mes anterior"
next: "Próximo mes"
go: "Click para navegar"
desktop/views/components/choose-file-from-drive-window.vue:
choose-file: "ファイル選択中"
upload: "PCからドライブにファイルをアップロード"
cancel: "キャンセル"
ok: "決定"
choose-prompt: "ファイルを選択"
choose-file: "Escoger archivos"
upload: "Cargar archivos de tu dispositivo"
cancel: "Cancelar"
ok: "OK"
choose-prompt: "Escoger archivos"
desktop/views/components/choose-folder-from-drive-window.vue:
cancel: "キャンセル"
ok: "決定"
cancel: "Cancelar"
ok: "OK"
choose-prompt: "Escoge una Carpeta"
desktop/views/components/crop-window.vue:
skip: "クロップをスキップ"
skip: "Ignorar el cortado"
cancel: "Cancelar"
ok: "OK"
desktop/views/components/drive-window.vue:
@@ -438,8 +439,8 @@ desktop/views/components/drive.file.vue:
banner: "Banner"
contextmenu:
rename: "Renombrar"
mark-as-sensitive: "閲覧注意に設定"
unmark-as-sensitive: "閲覧注意を解除"
mark-as-sensitive: "Marcar como 'sensible'"
unmark-as-sensitive: "Desmarcar como 'sensible'"
copy-url: "Copia la URL"
download: "Descargar"
else-files: "Otros"
@@ -484,8 +485,8 @@ desktop/views/components/drive.vue:
upload: "Subir fichero"
url-upload: "Subir desde una URL"
desktop/views/components/media-image.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "El contenido es NSFW (no seguro para ver en el trabajo, 'not safe for work')"
click-to-show: "Click para mostrar"
desktop/views/components/media-video.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
@@ -652,26 +653,26 @@ desktop/views/components/settings.vue:
version: "バージョン:"
latest-version: "最新のバージョン:"
update-checking: "アップデートを確認中"
do-update: "アップデートを確認"
update-settings: "詳細設定"
prevent-update: "アップデートを延期する(非推奨)"
prevent-update-desc: "この設定をオンにしてもアップデートが反映される場合があります。この設定はこのデバイスのみ有効です。"
no-updates: "利用可能な更新はありません"
no-updates-desc: "お使いのMisskeyは最新です。"
update-available: "新しいバージョンが利用可能です"
update-available-desc: "ページを再度読み込みすると更新が適用されます。"
advanced-settings: "高度な設定"
debug-mode: "デバッグモードを有効にする"
debug-mode-desc: "この設定はブラウザに記憶されます。"
experimental: "実験的機能を有効にする"
experimental-desc: "実験的機能を有効にするとMisskeyの動作が不安定になる可能性があります。この設定はブラウザに記憶されます。"
tools: "ツール"
task-manager: "タスクマネージャ"
third-parties: "サードパーティ"
do-update: "Chequear por actualizaciones"
update-settings: "Configuración avanzada"
prevent-update: "Posponer actualizaciones (no recomendado)"
prevent-update-desc: "Incluso si activas esta configuración, algunas actualizaciones podrían aplicarse. Esta configuración está habilitada sólo para este dispositivo."
no-updates: "No hay actualizaciones disponibles"
no-updates-desc: "Tu Misskey está actualizado"
update-available: "Una nueva versión está disponible"
update-available-desc: "Las actualizaciones se aplicarán cuando actualices la página nuevamente."
advanced-settings: "Avanzado"
debug-mode: "Habilitar modo de depuración"
debug-mode-desc: "Esta configuración se ha guardado en el navegador."
experimental: "Habilitar herramientas experimentales"
experimental-desc: "Activar esto puede hacer que tu cliente de Misskey se vuelva inestable. La configuración se ha guardado en el navegador."
tools: "Herramientas"
task-manager: "Navegador de tareas"
third-parties: "Servicios externos"
desktop/views/components/settings.2fa.vue:
intro: "二段階認証を設定すると、サインイン時にパスワードだけでなく、予め登録しておいた物理的なデバイス(例えばあなたのスマートフォンなど)も必要になり、よりセキュリティが向上します。"
detail: "詳細..."
url: "https://www.google.co.jp/intl/ja/landing/2step/"
detail: "Ver detalles..."
url: "https://www.google.com/landing/2step/"
caution: "Si pierdes acceso al dispositivo, no podrás conectarte a Misskey."
register: "Registrar un dispositivo"
already-registered: "Un dispositivo ya fue registrado"
@@ -704,19 +705,19 @@ desktop/views/components/settings.password.vue:
reset: "Cambiar contraseña"
enter-current-password: "Ingresar contraseña actual"
enter-new-password: "Ingresar nueva contraseña"
enter-new-password-again: "もう一度新しいパスワードを入力してください"
not-match: "新しいパスワードが一致しません"
changed: "パスワードを変更しました"
enter-new-password-again: "Ingresar nueva contraseña de nuevo"
not-match: "Las nuevas contraseñas no se corresponden consigo mismas"
changed: "Contraseña actualizada"
desktop/views/components/settings.profile.vue:
avatar: "アイコン"
choice-avatar: "画像を選択"
name: "名前"
location: "場所"
description: "自己紹介"
birthday: "誕生日"
save: "保存"
locked-account: "アカウントの保護"
is-locked: "投稿を非公開にする"
avatar: "Avatar"
choice-avatar: "Escoger una imagen"
name: "Nombre"
location: "Localización"
description: "Descripción"
birthday: "Fecha de nacimiento"
save: "Perfil actualizado"
locked-account: "Protege tu cuenta"
is-locked: "Crear una nota privada"
other: "その他"
is-bot: "このアカウントはBotです"
is-cat: "このアカウントはCatです"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Félicitations !"
angry: "En colère"
confused: "Confus"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Que faîtes vous maintenant ?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -70,6 +70,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:

View File

@@ -66,6 +66,7 @@ common:
congrats: "받으세요"
angry: "화냈어"
confused: "곤란하고 있어"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "지금 어떻게하고있어?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "Gratuluję!"
angry: "Wściekły"
confused: "Zmieszany"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "Co robisz?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -66,6 +66,7 @@ common:
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
rip: "RIP"
pudding: "Pudding"
note-placeholders:
a: "今どうしてる?"

View File

@@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "5.20.1",
"clientVersion": "1.0.8105",
"version": "5.22.0",
"clientVersion": "1.0.8127",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
@@ -59,7 +59,7 @@
"@types/mocha": "5.2.3",
"@types/mongodb": "3.1.3",
"@types/ms": "0.7.30",
"@types/node": "10.5.7",
"@types/node": "10.5.8",
"@types/portscanner": "2.1.0",
"@types/pug": "2.0.4",
"@types/qrcode": "1.2.0",
@@ -98,7 +98,7 @@
"diskusage": "0.2.4",
"dompurify": "1.0.5",
"elasticsearch": "15.1.1",
"element-ui": "2.4.5",
"element-ui": "2.4.6",
"emojilib": "2.3.0",
"escape-regexp": "0.0.1",
"eslint": "5.0.1",
@@ -106,7 +106,7 @@
"eventemitter3": "3.1.0",
"exif-js": "2.3.0",
"file-loader": "1.1.11",
"file-type": "8.1.0",
"file-type": "9.0.0",
"fuckadblock": "3.2.1",
"gulp": "3.9.1",
"gulp-cssnano": "2.1.3",
@@ -171,7 +171,7 @@
"recaptcha-promise": "0.1.3",
"reconnecting-websocket": "3.2.2",
"redis": "2.8.0",
"request": "2.87.0",
"request": "2.88.0",
"request-promise-native": "1.0.5",
"rimraf": "2.6.2",
"rndstr": "1.0.0",
@@ -187,7 +187,7 @@
"style-loader": "0.22.1",
"stylus": "0.54.5",
"stylus-loader": "3.0.2",
"summaly": "2.1.1",
"summaly": "2.1.2",
"systeminformation": "3.42.9",
"syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0",

View File

@@ -8,6 +8,7 @@
<img v-if="reaction == 'congrats'" src="/assets/reactions/congrats.png" alt="%i18n:common.reactions.congrats%">
<img v-if="reaction == 'angry'" src="/assets/reactions/angry.png" alt="%i18n:common.reactions.angry%">
<img v-if="reaction == 'confused'" src="/assets/reactions/confused.png" alt="%i18n:common.reactions.confused%">
<img v-if="reaction == 'rip'" src="/assets/reactions/rip.png" alt="%i18n:common.reactions.rip%">
<template v-if="reaction == 'pudding'">
<img v-if="$store.getters.isSignedIn && $store.state.settings.iLikeSushi" src="/assets/reactions/sushi.png" alt="%i18n:common.reactions.pudding%">
<img v-else src="/assets/reactions/pudding.png" alt="%i18n:common.reactions.pudding%">

View File

@@ -10,9 +10,10 @@
<button @click="react('hmm')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="4" title="%i18n:common.reactions.hmm%"><mk-reaction-icon reaction='hmm'/></button>
<button @click="react('surprise')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="5" title="%i18n:common.reactions.surprise%"><mk-reaction-icon reaction='surprise'/></button>
<button @click="react('congrats')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="6" title="%i18n:common.reactions.congrats%"><mk-reaction-icon reaction='congrats'/></button>
<button @click="react('angry')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="4" title="%i18n:common.reactions.angry%"><mk-reaction-icon reaction='angry'/></button>
<button @click="react('confused')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="5" title="%i18n:common.reactions.confused%"><mk-reaction-icon reaction='confused'/></button>
<button @click="react('pudding')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="6" title="%i18n:common.reactions.pudding%"><mk-reaction-icon reaction='pudding'/></button>
<button @click="react('angry')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="7" title="%i18n:common.reactions.angry%"><mk-reaction-icon reaction='angry'/></button>
<button @click="react('confused')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="8" title="%i18n:common.reactions.confused%"><mk-reaction-icon reaction='confused'/></button>
<button @click="react('rip')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="9" title="%i18n:common.reactions.rip%"><mk-reaction-icon reaction='rip'/></button>
<button @click="react('pudding')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="10" title="%i18n:common.reactions.pudding%"><mk-reaction-icon reaction='pudding'/></button>
</div>
</div>
</div>

View File

@@ -9,6 +9,7 @@
<span v-if="reactions.congrats"><mk-reaction-icon reaction="congrats"/><span>{{ reactions.congrats }}</span></span>
<span v-if="reactions.angry"><mk-reaction-icon reaction="angry"/><span>{{ reactions.angry }}</span></span>
<span v-if="reactions.confused"><mk-reaction-icon reaction="confused"/><span>{{ reactions.confused }}</span></span>
<span v-if="reactions.rip"><mk-reaction-icon reaction="rip"/><span>{{ reactions.rip }}</span></span>
<span v-if="reactions.pudding"><mk-reaction-icon reaction="pudding"/><span>{{ reactions.pudding }}</span></span>
</template>
</div>

View File

@@ -12,13 +12,13 @@
</ui-input>
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
<p style="margin: 8px 0;">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
<p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
</form>
</template>
<script lang="ts">
import Vue from 'vue';
import { apiUrl, host } from '../../../config';
import { apiUrl, host, twitterIntegration } from '../../../config';
export default Vue.extend({
props: {
@@ -36,7 +36,8 @@ export default Vue.extend({
password: '',
token: '',
apiUrl,
host
host,
twitterIntegration
};
},
methods: {

View File

@@ -104,13 +104,15 @@ export default Vue.extend({
}
fetch('/url?url=' + encodeURIComponent(this.url)).then(res => {
res.json().then(info => {
this.title = info.title;
this.description = info.description;
this.thumbnail = info.thumbnail;
this.icon = info.icon;
this.sitename = info.sitename;
if (info.url != null) {
this.title = info.title;
this.description = info.description;
this.thumbnail = info.thumbnail;
this.icon = info.icon;
this.sitename = info.sitename;
this.fetching = false;
this.fetching = false;
}
});
});
}

View File

@@ -22,6 +22,7 @@ declare const _CODENAME_: string;
declare const _LICENSE_: string;
declare const _GOOGLE_MAPS_API_KEY_: string;
declare const _WELCOME_BG_URL_: string;
declare const _TWITTER_INTEGRATION_: boolean;
export const host = _HOST_;
export const hostname = _HOSTNAME_;
@@ -47,3 +48,4 @@ export const codename = _CODENAME_;
export const license = _LICENSE_;
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
export const welcomeBgUrl = _WELCOME_BG_URL_;
export const twitterIntegration = _TWITTER_INTEGRATION_;

View File

@@ -18,7 +18,7 @@
<div class="about">
<h1 v-if="name != 'Misskey'">{{ name }}</h1>
<h1 v-else><img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name"></h1>
<p class="powerd-by" v-if="name != 'Misskey'">%i18n:@powered-by-misskey%</p>
<p class="powerd-by" v-if="name != 'Misskey'" v-html="'%i18n:@powered-by-misskey%'"></p>
<p class="desc" v-html="description || '%i18n:common.about%'"></p>
<a ref="signup" @click="signup">📦 %i18n:@signup%</a>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -0,0 +1,41 @@
name: "DriveFolder"
desc:
ja: "ドライブのフォルダを表します。"
en: "A folder of Drive."
props:
id:
type: "id"
optional: false
desc:
ja: "フォルダID"
en: "The ID of this folder"
createdAt:
type: "date"
optional: false
desc:
ja: "作成日時"
en: "The created date of this folder"
userId:
type: "id(User)"
optional: false
desc:
ja: "所有者ID"
en: "The ID of the owner of this folder"
parentId:
type: "entity(DriveFolder)"
optional: false
desc:
ja: "親フォルダのID (ルートなら null)"
en: "The ID of parent folder"
name:
type: "string"
optional: false
desc:
ja: "フォルダ名"
en: "The name of this folder"

View File

@@ -8,6 +8,7 @@ export default function(reaction: string): string {
case 'congrats': return '🎉';
case 'angry': return '💢';
case 'confused': return '😥';
case 'rip': return '😇';
case 'pudding': return '🍮';
default: return '';
}

View File

@@ -10,7 +10,7 @@ import DriveFileThumbnail, { deleteDriveFileThumbnail } from './drive-file-thumb
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
DriveFile.createIndex('md5');
DriveFile.createIndex('metadata.uri', { sparse: true, unique: true });
DriveFile.createIndex(['metadata.uri', 'metadata.userId'], { sparse: true, unique: true });
export default DriveFile;
export const DriveFileChunk = monkDb.get('driveFiles.chunks');

View File

@@ -26,6 +26,7 @@ export const validateReaction = $.str.or([
'congrats',
'angry',
'confused',
'rip',
'pudding'
]);

View File

@@ -7,7 +7,7 @@ export default async (job: bq.Job, done: any): Promise<void> => {
await request(job.data.user, job.data.to, job.data.content);
done();
} catch (res) {
if (!res.hasOwnProperty('statusCode')) {
if (res == null || !res.hasOwnProperty('statusCode')) {
console.warn(`deliver failed (unknown): ${res}`);
return done();
}

View File

@@ -40,6 +40,5 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
});
// Serialize
res(await Promise.all(history.map(async h =>
await pack(h.messageId, user))));
res(await Promise.all(history.map(h => pack(h.messageId, user))));
});

View File

@@ -0,0 +1,43 @@
import $ from 'cafy'; import ID from '../../../../../misc/cafy-id';
import Message from '../../../../../models/messaging-message';
import { ILocalUser } from '../../../../../models/user';
import read from '../../../common/read-messaging-message';
import getParams from '../../../get-params';
export const meta = {
desc: {
ja: '指定した自分宛てのメッセージを既読にします。',
en: 'Mark as read a message of messaging.'
},
requireCredential: true,
kind: 'messaging-write',
params: {
messageId: $.type(ID).note({
desc: {
ja: '既読にするメッセージのID',
en: 'The ID of a message that you want to mark as read'
}
})
}
};
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) throw psErr;
const message = await Message.findOne({
_id: ps.messageId,
recipientId: user._id
});
if (message == null) {
return rej('message not found');
}
read(user._id, message.userId, message);
res();
});

View File

@@ -8,7 +8,8 @@ import getParams from '../../get-params';
export const meta = {
desc: {
ja: 'タイムラインを取得します。'
ja: 'タイムラインを取得します。',
en: 'Get timeline of myself.'
},
requireCredential: true,
@@ -67,9 +68,6 @@ export const meta = {
}
};
/**
* Get timeline of myself
*/
export default async (params: any, user: ILocalUser) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) throw psErr;

View File

@@ -14,7 +14,9 @@ module.exports = async (ctx: Koa.Context) => {
ctx.body = summary;
} catch (e) {
ctx.status = 500;
ctx.status = 200;
ctx.set('Cache-Control', 'max-age=86400, immutable');
ctx.body = '{}';
}
};

View File

@@ -294,16 +294,35 @@ export default async function(
metadata.uri = uri;
}
const driveFile = isLink
? await DriveFile.insert({
length: 0,
uploadDate: new Date(),
md5: hash,
filename: detectedName,
metadata: metadata,
contentType: mime
})
: await (save(fs.createReadStream(path), detectedName, mime, hash, size, metadata));
let driveFile: IDriveFile;
if (isLink) {
try {
driveFile = await DriveFile.insert({
length: 0,
uploadDate: new Date(),
md5: hash,
filename: detectedName,
metadata: metadata,
contentType: mime
});
} catch (e) {
// duplicate key error (when already registered)
if (e.code === 11000) {
log(`already registered ${metadata.uri}`);
driveFile = await DriveFile.findOne({
'metadata.uri': metadata.uri,
'metadata.userId': user._id
});
} else {
console.error(e);
throw e;
}
}
} else {
driveFile = await (save(fs.createReadStream(path), detectedName, mime, hash, size, metadata));
}
log(`drive file has been created ${driveFile._id}`);

View File

@@ -188,6 +188,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
// 通知
if (isLocalUser(data.reply._user)) {
nm.push(data.reply.userId, 'reply');
publishUserStream(data.reply.userId, 'reply', noteObj);
}
}
@@ -209,7 +210,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
}
// Publish event
if (!user._id.equals(data.renote.userId)) {
if (!user._id.equals(data.renote.userId) && isLocalUser(data.renote._user)) {
publishUserStream(data.renote.userId, 'renote', noteObj);
}
}

View File

@@ -95,7 +95,8 @@ const consts = {
_URL_: config.url,
_LICENSE_: licenseHtml,
_GOOGLE_MAPS_API_KEY_: config.google_maps_api_key,
_WELCOME_BG_URL_: config.welcome_bg_url
_WELCOME_BG_URL_: config.welcome_bg_url,
_TWITTER_INTEGRATION_: config.twitter != null
};
const _consts: { [ key: string ]: any } = {};