From a23ef386ea8f79b1f0f3aa4532c77420675885a6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 28 Jun 2018 16:21:35 +0900 Subject: Fix bug --- src/client/app/common/scripts/get-kao.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/app/common/scripts/get-kao.ts b/src/client/app/common/scripts/get-kao.ts index d380187510..645196132b 100644 --- a/src/client/app/common/scripts/get-kao.ts +++ b/src/client/app/common/scripts/get-kao.ts @@ -1,5 +1,5 @@ export default () => [ '(=^・・^=)', - 'v('ω')v', + 'v(\'ω\')v', '🐡( \'-\' 🐡 )フグパンチ!!!!' ][Math.floor(Math.random() * 3)]; -- cgit v1.2.3-freya From 1673957aa68203813fd7a9c53f53429e05906f4d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 1 Jul 2018 13:40:31 +0900 Subject: Update rate limit --- src/server/api/endpoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts index f613710c80..146de67253 100644 --- a/src/server/api/endpoints.ts +++ b/src/server/api/endpoints.ts @@ -509,7 +509,7 @@ const endpoints: Endpoint[] = [ withCredential: true, limit: { duration: ms('1hour'), - max: 120, + max: 300, minInterval: ms('1second') }, kind: 'note-write' -- cgit v1.2.3-freya From 5fb8f5a8c765c2c2a47cfbf2df8c51a3eca4c0c5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 1 Jul 2018 13:44:24 +0900 Subject: Improve error message --- src/remote/activitypub/models/person.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 94a6cee0bc..83afd68268 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -52,7 +52,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise Date: Sun, 1 Jul 2018 13:46:34 +0900 Subject: Fix bug --- src/mfm/html.ts | 4 ++++ src/mfm/parse/index.ts | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mfm/html.ts b/src/mfm/html.ts index 64208af88b..71b4739476 100644 --- a/src/mfm/html.ts +++ b/src/mfm/html.ts @@ -92,6 +92,10 @@ const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers: }; export default (tokens: TextElement[], mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => { + if (tokens == null) { + return null; + } + const { window } = new JSDOM(''); for (const token of tokens) { diff --git a/src/mfm/parse/index.ts b/src/mfm/parse/index.ts index 2b6a459b1e..8d71409e58 100644 --- a/src/mfm/parse/index.ts +++ b/src/mfm/parse/index.ts @@ -43,8 +43,7 @@ export type TextElement = { type: 'text', content: string } export type TextElementProcessor = (text: string, i: number) => TextElement | TextElement[]; export default (source: string): TextElement[] => { - - if (source == '') { + if (source == null || source == '') { return null; } -- cgit v1.2.3-freya