From bdc7167cf4417d1ffcfb0a5561491a7c32b5454f Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 19 Apr 2019 01:39:39 +0900 Subject: [PATCH 01/14] 10.102.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9589b8fa54ca..5a9f732fdf6a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "10.101.0", + "version": "10.102.0", "codename": "nighthike", "repository": { "type": "git", From 828a2a73c9302bde131be9f9cc3b99e14d6214c8 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 21 Apr 2019 02:38:02 +0900 Subject: [PATCH 02/14] =?UTF-8?q?Fix=20=E6=8A=95=E7=A8=BF=E5=A2=97?= =?UTF-8?q?=E6=AE=96=20for=20v10=20(#4758)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #4632 * remove unused import --- src/server/api/endpoints/ap/show.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/api/endpoints/ap/show.ts b/src/server/api/endpoints/ap/show.ts index a7c9e55d4f89..f3fa9d2e7415 100644 --- a/src/server/api/endpoints/ap/show.ts +++ b/src/server/api/endpoints/ap/show.ts @@ -86,6 +86,17 @@ async function fetchAny(uri: string) { // /@user のような正規id以外で取得できるURIが指定されていた場合、ここで初めて正規URIが確定する // これはDBに存在する可能性があるため再度DB検索 if (uri !== object.id) { + if (object.id.startsWith(config.url + '/')) { + const id = new mongo.ObjectID(object.id.split('/').pop()); + const [user, note] = await Promise.all([ + User.findOne({ _id: id }), + Note.findOne({ _id: id }) + ]); + + const packed = await mergePack(user, note); + if (packed !== null) return packed; + } + const [user, note] = await Promise.all([ User.findOne({ uri: object.id }), Note.findOne({ uri: object.id }) From 7d31bd97ff45ccf404d4f06b7a699f0d62ba85f1 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 21 Apr 2019 02:41:12 +0900 Subject: [PATCH 03/14] Validate Note on createNote for v10 (#4757) * Validate Note on createNote * Add extractApHost --- src/misc/convert-host.ts | 5 +++++ src/remote/activitypub/models/note.ts | 30 ++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/misc/convert-host.ts b/src/misc/convert-host.ts index 8f2f1c7aba7c..ac8b24725ba3 100644 --- a/src/misc/convert-host.ts +++ b/src/misc/convert-host.ts @@ -16,6 +16,11 @@ export function extractDbHost(uri: string) { return toDbHost(url.hostname); } +export function extractApHost(uri: string) { + const url = new URL(uri); + return toApHost(url.hostname); +} + export function toDbHost(host: string) { if (host == null) return null; return toUnicode(host.toLowerCase()); diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 6251621527cb..87764dd0620d 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -20,10 +20,32 @@ import { apLogger } from '../logger'; import { IDriveFile } from '../../../models/drive-file'; import { deliverQuestionUpdate } from '../../../services/note/polls/update'; import Instance from '../../../models/instance'; -import { extractDbHost } from '../../../misc/convert-host'; +import { extractDbHost, extractApHost } from '../../../misc/convert-host'; const logger = apLogger; +export function validateNote(object: any, uri: string) { + const expectHost = extractApHost(uri); + + if (object == null) { + return new Error('invalid Note: object is null'); + } + + if (!['Note', 'Question', 'Article'].includes(object.type)) { + return new Error(`invalid Note: invalied object type ${object.type}`); + } + + if (object.id && extractApHost(object.id) !== expectHost) { + return new Error(`invalid Note: id has different host. expected: ${expectHost}, actual: ${extractApHost(object.id)}`); + } + + if (object.attributedTo && extractApHost(object.attributedTo) !== expectHost) { + return new Error(`invalid Note: attributedTo has different host. expected: ${expectHost}, actual: ${extractApHost(object.attributedTo)}`); + } + + return null; +} + /** * Noteをフェッチします。 * @@ -57,8 +79,10 @@ export async function createNote(value: any, resolver?: Resolver, silent = false const object: any = await resolver.resolve(value); - if (!object || !['Note', 'Question', 'Article'].includes(object.type)) { - logger.error(`invalid note: ${value}`, { + const entryUri = value.id || value; + const err = validateNote(object, entryUri); + if (err) { + logger.error(`${err.message}`, { resolver: { history: resolver.getHistory() }, From 24278a99b5e68b92e217de11f70e37bf5872723f Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 05:19:31 +0900 Subject: [PATCH 04/14] =?UTF-8?q?Note=E3=81=8C=E9=96=93=E6=8E=A5=E5=8F=82?= =?UTF-8?q?=E7=85=A7=E3=81=95=E3=82=8C=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AF?= =?UTF-8?q?streaming=E7=AD=89=E3=81=ABpublish=E3=81=97=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/activitypub/models/note.ts | 2 +- src/server/api/endpoints/ap/show.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 87764dd0620d..1ba54c3c34fe 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -265,7 +265,7 @@ export async function resolveNote(value: string | IObject, resolver?: Resolver): // リモートサーバーからフェッチしてきて登録 // ここでuriの代わりに添付されてきたNote Objectが指定されていると、サーバーフェッチを経ずにノートが生成されるが // 添付されてきたNote Objectは偽装されている可能性があるため、常にuriを指定してサーバーフェッチを行う。 - return await createNote(uri, resolver); + return await createNote(uri, resolver, true); } export async function extractEmojis(tags: ITag[], host_: string) { diff --git a/src/server/api/endpoints/ap/show.ts b/src/server/api/endpoints/ap/show.ts index f3fa9d2e7415..d8001d2f514e 100644 --- a/src/server/api/endpoints/ap/show.ts +++ b/src/server/api/endpoints/ap/show.ts @@ -116,7 +116,7 @@ async function fetchAny(uri: string) { } if (['Note', 'Question', 'Article'].includes(object.type)) { - const note = await createNote(object.id); + const note = await createNote(object.id, null, true); return { type: 'Note', object: await packNote(note, null, { detail: true }) From 1def2f08979a6fb019a26a2bd56295a26f38871e Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 16:13:48 +0900 Subject: [PATCH 05/14] =?UTF-8?q?Fix:=20=E3=83=A6=E3=83=BC=E3=82=B6?= =?UTF-8?q?=E3=83=BCresync=E3=81=8C=E8=87=AA=E5=8B=95=E5=AE=9F=E8=A1=8C?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/resolve-user.ts | 18 ++++++------------ src/server/api/endpoints/users/show.ts | 8 ++------ 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index ca6167d28fd9..8b7a1dfaf193 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -1,5 +1,5 @@ import { toUnicode, toASCII } from 'punycode'; -import User, { IUser, IRemoteUser, isRemoteUser } from '../models/user'; +import User, { IUser, IRemoteUser } from '../models/user'; import webFinger from './webfinger'; import config from '../config'; import { createPerson, updatePerson } from './activitypub/models/person'; @@ -28,7 +28,7 @@ export default async (username: string, _host: string, option?: any, resync = fa return await User.findOne({ usernameLower, host: null }); } - const user = await User.findOne({ usernameLower, host }, option); + const user = await User.findOne({ usernameLower, host }, option) as IRemoteUser; const acctLower = `${usernameLower}@${hostAscii}`; @@ -39,14 +39,15 @@ export default async (username: string, _host: string, option?: any, resync = fa return await createPerson(self.href); } - if (resync) { + // resyncオプション OR ユーザー情報が古い場合は、WebFilgerからやりなおして返す + if (resync || user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { logger.info(`try resync: ${acctLower}`); const self = await resolveSelf(acctLower); - if ((user as IRemoteUser).uri !== self.href) { + if (user.uri !== self.href) { // if uri mismatch, Fix (user@host <=> AP's Person id(IRemoteUser.uri)) mapping. logger.info(`uri missmatch: ${acctLower}`); - logger.info(`recovery missmatch uri for (username=${username}, host=${host}) from ${(user as IRemoteUser).uri} to ${self.href}`); + logger.info(`recovery missmatch uri for (username=${username}, host=${host}) from ${user.uri} to ${self.href}`); // validate uri const uri = new URL(self.href); @@ -72,13 +73,6 @@ export default async (username: string, _host: string, option?: any, resync = fa return await User.findOne({ uri: self.href }); } - // ユーザーの情報が古かったらついでに更新しておく - if (isRemoteUser(user)) { - if (user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { - updatePerson(user.uri); - } - } - logger.info(`return existing remote user: ${acctLower}`); return user; }; diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 4e59945eba19..de31e12fa706 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id'; -import User, { pack, isRemoteUser } from '../../../../models/user'; +import User, { pack } from '../../../../models/user'; import resolveRemoteUser from '../../../../remote/resolve-user'; import define from '../../define'; import { apiLogger } from '../../logger'; @@ -97,11 +97,7 @@ export default define(meta, async (ps, me) => { } // ユーザー情報更新 - if (isRemoteUser(user)) { - if (user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { - resolveRemoteUser(ps.username, ps.host, { }, true); - } - } + resolveRemoteUser(ps.username, ps.host, { }, false); return await pack(user, me, { detail: true From 42f80df3542be4923de2746f3bf4e2ec695866fc Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 16:27:50 +0900 Subject: [PATCH 06/14] =?UTF-8?q?search=E3=81=A7updatePerson=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/users/search.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 0820fc34a4dc..60001af0896d 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -102,18 +102,5 @@ export default define(meta, async (ps, me) => { }); } - // ついでにバックグラウンドでリモートユーザー情報を更新しておく - updateUsers(users); - return await Promise.all(users.map(user => pack(user, me, { detail: ps.detail }))); }); - -async function updateUsers(users: IUser[]) { - for (const user of users) { - if (isRemoteUser(user)) { - if (user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24 * 30) { // 30days - await updatePerson(user.uri).catch(() => {}); - } - } - } -} From 16302206ec8ac1a67b3fe67d6a5168056f34edbe Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 16:31:10 +0900 Subject: [PATCH 07/14] remote unused --- src/server/api/endpoints/users/search.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 60001af0896d..84a5bc7d844c 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -1,9 +1,8 @@ import $ from 'cafy'; import * as escapeRegexp from 'escape-regexp'; -import User, { pack, validateUsername, IUser, isRemoteUser } from '../../../../models/user'; +import User, { pack, validateUsername, IUser } from '../../../../models/user'; import define from '../../define'; import { toDbHost } from '../../../../misc/convert-host'; -import { updatePerson } from '../../../../remote/activitypub/models/person'; export const meta = { desc: { From c56ea3e5ff9c77e92b91b8cc9398277870a531b9 Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 16:31:25 +0900 Subject: [PATCH 08/14] =?UTF-8?q?=E3=81=93=E3=81=93=E3=81=AB=E3=81=82?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=82=82=E6=84=8F=E5=91=B3=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/users/show.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index de31e12fa706..4561c5f1d9ec 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -96,9 +96,6 @@ export default define(meta, async (ps, me) => { throw new ApiError(meta.errors.noSuchUser); } - // ユーザー情報更新 - resolveRemoteUser(ps.username, ps.host, { }, false); - return await pack(user, me, { detail: true }); From 514f11560a9ca4a8f5dcd5977e2901a4f560c35f Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 16:32:15 +0900 Subject: [PATCH 09/14] =?UTF-8?q?lastFetchedAt=E4=BA=8B=E5=89=8D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=81=AFWebFinger=E3=81=99=E3=82=8B=E5=89=8D=E3=81=AE?= =?UTF-8?q?=E3=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/activitypub/models/person.ts | 7 ------- src/remote/resolve-user.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index b5fea8941e26..768b0b6cedb7 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -295,13 +295,6 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje } //#endregion - // 繋がらないインスタンスに何回も試行するのを防ぐ, 後続の同様処理の連続試行を防ぐ ため 試行前にも更新する - await User.update({ _id: exist._id }, { - $set: { - lastFetchedAt: new Date(), - }, - }); - if (resolver == null) resolver = new Resolver(); const object = hint || await resolver.resolve(uri) as any; diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index 8b7a1dfaf193..767eb89b71ae 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -41,6 +41,13 @@ export default async (username: string, _host: string, option?: any, resync = fa // resyncオプション OR ユーザー情報が古い場合は、WebFilgerからやりなおして返す if (resync || user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { + // 繋がらないインスタンスに何回も試行するのを防ぐ, 後続の同様処理の連続試行を防ぐ ため 試行前にも更新する + await User.update({ _id: user._id }, { + $set: { + lastFetchedAt: new Date(), + }, + }); + logger.info(`try resync: ${acctLower}`); const self = await resolveSelf(acctLower); From 963ea2ba1ef62ec44bb384f401e97fa556d072f6 Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 21 Apr 2019 21:06:35 +0900 Subject: [PATCH 10/14] =?UTF-8?q?id=E3=81=A7users/show=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB=E3=82=82=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/users/show.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 4561c5f1d9ec..0c19d4b8aaa7 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id'; -import User, { pack } from '../../../../models/user'; +import User, { pack, isRemoteUser } from '../../../../models/user'; import resolveRemoteUser from '../../../../remote/resolve-user'; import define from '../../define'; import { apiLogger } from '../../logger'; @@ -90,6 +90,10 @@ export default define(meta, async (ps, me) => { : { usernameLower: ps.username.toLowerCase(), host: null }; user = await User.findOne(q, cursorOption); + + if (isRemoteUser(user)) { + resolveRemoteUser(user.username, user.host); + } } if (user === null) { From 98b8a94f2bf2c1d64c88eadf8c10af1e5d1590a9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 21 Apr 2019 23:56:56 +0900 Subject: [PATCH 11/14] =?UTF-8?q?Fix:=20=E3=83=AA=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E5=BE=A9=E5=87=A6=E7=90=86=E3=81=8C=E8=87=AA=E5=8B=95=E7=9A=84?= =?UTF-8?q?=E3=81=AB=E5=AE=9F=E8=A1=8C=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=20for=20v10=20(#4763)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: ユーザーresyncが自動実行されない * ここにあっても意味がない * lastFetchedAt事前更新はWebFingerする前のみ * lint fix --- src/remote/activitypub/models/person.ts | 7 ------- src/remote/resolve-user.ts | 18 +++++++++++++----- src/server/api/endpoints/users/show.ts | 9 +-------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 570e92d73643..2995e1dbbe42 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -294,13 +294,6 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje } //#endregion - // 繋がらないインスタンスに何回も試行するのを防ぐ, 後続の同様処理の連続試行を防ぐ ため 試行前にも更新する - await User.update({ _id: exist._id }, { - $set: { - lastFetchedAt: new Date(), - }, - }); - if (resolver == null) resolver = new Resolver(); const object = hint || await resolver.resolve(uri) as any; diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index df5aee7a06f0..767eb89b71ae 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -9,7 +9,7 @@ import chalk from 'chalk'; const logger = remoteLogger.createSubLogger('resolve-user'); -export default async (username: string, _host: string, option?: any, resync?: boolean): Promise => { +export default async (username: string, _host: string, option?: any, resync = false): Promise => { const usernameLower = username.toLowerCase(); if (_host == null) { @@ -28,7 +28,7 @@ export default async (username: string, _host: string, option?: any, resync?: bo return await User.findOne({ usernameLower, host: null }); } - const user = await User.findOne({ usernameLower, host }, option); + const user = await User.findOne({ usernameLower, host }, option) as IRemoteUser; const acctLower = `${usernameLower}@${hostAscii}`; @@ -39,14 +39,22 @@ export default async (username: string, _host: string, option?: any, resync?: bo return await createPerson(self.href); } - if (resync) { + // resyncオプション OR ユーザー情報が古い場合は、WebFilgerからやりなおして返す + if (resync || user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { + // 繋がらないインスタンスに何回も試行するのを防ぐ, 後続の同様処理の連続試行を防ぐ ため 試行前にも更新する + await User.update({ _id: user._id }, { + $set: { + lastFetchedAt: new Date(), + }, + }); + logger.info(`try resync: ${acctLower}`); const self = await resolveSelf(acctLower); - if ((user as IRemoteUser).uri !== self.href) { + if (user.uri !== self.href) { // if uri mismatch, Fix (user@host <=> AP's Person id(IRemoteUser.uri)) mapping. logger.info(`uri missmatch: ${acctLower}`); - logger.info(`recovery missmatch uri for (username=${username}, host=${host}) from ${(user as IRemoteUser).uri} to ${self.href}`); + logger.info(`recovery missmatch uri for (username=${username}, host=${host}) from ${user.uri} to ${self.href}`); // validate uri const uri = new URL(self.href); diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 4e59945eba19..4561c5f1d9ec 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id'; -import User, { pack, isRemoteUser } from '../../../../models/user'; +import User, { pack } from '../../../../models/user'; import resolveRemoteUser from '../../../../remote/resolve-user'; import define from '../../define'; import { apiLogger } from '../../logger'; @@ -96,13 +96,6 @@ export default define(meta, async (ps, me) => { throw new ApiError(meta.errors.noSuchUser); } - // ユーザー情報更新 - if (isRemoteUser(user)) { - if (user.lastFetchedAt == null || Date.now() - user.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { - resolveRemoteUser(ps.username, ps.host, { }, true); - } - } - return await pack(user, me, { detail: true }); From acd4b101e15d9e21866b110c99119c0b50a70497 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 22 Apr 2019 00:51:57 +0900 Subject: [PATCH 12/14] 10.102.1 --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1185c2d6b2c..f5036878f1bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ If you encounter any problems with updating, please try the following: 1. `npm run clean` or `npm run cleanall` 2. Retry update (Don't forget `npm i`) +10.102.1 +---------- +* 投稿が増殖する問題を修正 +* リモートユーザーの修復処理が自動的に実行されない問題を修正 + 10.101.0 ---------- * WebFingerリクエストで Proxy, Keep-Alive などをサポート diff --git a/package.json b/package.json index 5a9f732fdf6a..8c7c1a4759ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "10.102.0", + "version": "10.102.1", "codename": "nighthike", "repository": { "type": "git", From 7f3d726daae19a53b7ae1c9d6d0e4e444050a6dc Mon Sep 17 00:00:00 2001 From: mei23 Date: Mon, 22 Apr 2019 01:15:54 +0900 Subject: [PATCH 13/14] Merge translations --- locales/en-US.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 4bbf8e93d5df..6249b4060c7b 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -478,12 +478,12 @@ common/views/components/user-menu.vue: mention: "Mention" mute: "Mute" unmute: "Unmute" - mute-confirm: "Do you want to mute this account?" - unmute-confirm: "Do you want to unmute this account?" + mute-confirm: "Are you sure you want to mute this user?" + unmute-confirm: "Are you certain that you want to unmute this user?" block: "Block" unblock: "Unblock" - block-confirm: "Do you want to block this account?" - unblock-confirm: "Do you want to unblock this account?" + block-confirm: "Are you sure you want to block this user?" + unblock-confirm: "Are you certain that you want to unblock this user?" push-to-list: "Add to list" select-list: "Select a list" report-abuse: "Report abuse" @@ -491,8 +491,12 @@ common/views/components/user-menu.vue: report-abuse-reported: "The issue has been reported to the administrator. Your cooperation is much appreciated." silence: "Silence" unsilence: "Unsilence" + silence-confirm: "Are you sure that you want to silence this user?" + unsilence-confirm: "Are you sure that you want to stop silencing this user?" suspend: "Suspend" unsuspend: "Unsuspend" + suspend-confirm: "Are you sure that you want to suspend this user?" + unsuspend-confirm: "Are you sure that you want to unsuspend this user?" common/views/components/poll.vue: vote-to: "Vote for '{}'" vote-count: "{} votes" @@ -675,6 +679,9 @@ common/views/components/user-list-editor.vue: remove-user: "Remove from this list" delete-are-you-sure: "Delete list \"$1\"?" deleted: "Deleted successfully" +common/views/components/user-lists.vue: + create-list: "Create a list" + list-name: "List name" common/views/widgets/broadcast.vue: fetching: "Checking" no-broadcasts: "No announcements" @@ -1024,8 +1031,6 @@ desktop/views/components/received-follow-requests-window.vue: reject: "Reject" desktop/views/components/user-lists-window.vue: title: "User lists" - create-list: "Create a list" - list-name: "List name" desktop/views/components/user-preview.vue: notes: "Posts" following: "Following" @@ -1208,7 +1213,9 @@ admin/views/users.vue: unsuspend-confirm: "Are you sure you want to unsuspend this account?" unsuspended: "The user has successfully unsuspended." make-silence: "Silence" + silence-confirm: "Silence user?" unmake-silence: "Unsilence" + unsilence-confirm: "Are you certain that you want to stop silencing this user?" verify: "Verify account" verify-confirm: "Do you want this to be a verified account?" verified: "The account is now being verified" @@ -1402,6 +1409,7 @@ desktop/views/widgets/polls.vue: desktop/views/widgets/post-form.vue: title: "Post" note: "Post" + something-happened: "Could not be posted in this circumstance." desktop/views/widgets/profile.vue: update-banner: "Click to edit your banner" update-avatar: "Click to edit your avatar" @@ -1420,12 +1428,11 @@ mobile/views/components/drive.vue: file-count: "File(s)" nothing-in-drive: "There's nothing stored." folder-is-empty: "This folder is empty" - prompt: "What do you want to do? (Please enter a number): <1 → Upload a file | 2 → Upload a file from a URL | 3 → Create a folder | 4 → Change this folder's name | 5 → Move this folder | 6 → Delete this folder>" - deletion-alert: "Sorry! Deleting a folder is not yet implemented." folder-name: "Folder name" here-is-root: "Currently, you are on the root, not inside of any folder." url-prompt: "URL of the file you want to upload" uploading: "Upload requested. It may take a while for the upload to finish." + folder-name-cannot-empty: "Folder name cannot be blank." mobile/views/components/drive-file-chooser.vue: select-file: "Choose files" mobile/views/components/drive-folder-chooser.vue: @@ -1499,9 +1506,16 @@ mobile/views/components/ui.nav.vue: game: "Games" admin: "Admin" about: "About Misskey" +mobile/views/pages/drive.vue: + contextmenu: + upload: "Upload a file" + url-upload: "Upload file from a URL" + create-folder: "Create a folder" + rename-folder: "Rename folder" + move-folder: "Move this folder" + delete-folder: "Delete this folder" mobile/views/pages/user-lists.vue: title: "Lists" - enter-list-name: "Enter a name of the list to make" mobile/views/pages/signup.vue: lets-start: "Your account is now ready! 📦" mobile/views/pages/followers.vue: @@ -1630,6 +1644,7 @@ dev/views/apps.vue: create-app: "Create app" app-missing: "No apps" dev/views/new-app.vue: + new-app: "New Application" create-app: "Creating application" app-name: "Application name" app-name-desc: "The name of your app" From da8d60c09ce5453f2d09e5d6d9f2df681ad10cc8 Mon Sep 17 00:00:00 2001 From: mei23 Date: Mon, 22 Apr 2019 01:18:04 +0900 Subject: [PATCH 14/14] 10.102.1-m190422011801 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c7c1a4759ba..acacde3e0ab6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "10.102.1", + "version": "10.102.1-m190422011801", "codename": "nighthike", "repository": { "type": "git",