From f2783900127afd103ae485ab1cd0f00aff2fcdd9 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 21 Sep 2021 02:50:35 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Notifications=E3=81=AE=E5=9E=8B=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update entities.ts * Update entities.ts * extract * fix app define extract * appの定義を修正 * 改行コード修正 * add changelog * fix Co-authored-by: syuilo --- CHANGELOG.md | 1 + etc/misskey-js.api.md | 6 +++++- src/entities.ts | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1eeb49fd2..972887ef54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,2 @@ +- Notificationsの型を修正 - MessagingMessageの型を修正 diff --git a/etc/misskey-js.api.md b/etc/misskey-js.api.md index 362b73a99f..3095a7917c 100644 --- a/etc/misskey-js.api.md +++ b/etc/misskey-js.api.md @@ -2275,10 +2275,14 @@ type Notification_2 = { userId: User['id']; } | { type: 'groupInvited'; + invitation: UserGroup; + user: User; + userId: User['id']; } | { type: 'app'; + header?: string | null; body: string; - icon: string; + icon?: string | null; }); // @public (undocumented) diff --git a/src/entities.ts b/src/entities.ts index 87c8134637..f21036d960 100644 --- a/src/entities.ts +++ b/src/entities.ts @@ -150,11 +150,15 @@ export type Notification = { user: User; userId: User['id']; } | { - type: 'groupInvited'; // TODO + type: 'groupInvited'; + invitation: UserGroup; + user: User; + userId: User['id']; } | { type: 'app'; + header?: string | null; body: string; - icon: string; + icon?: string | null; }); export type MessagingMessage = {