diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-13 02:17:54 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-13 02:17:54 +0900 |
| commit | 2feef8151625d9ba5d9c8b1850679b7fe84af809 (patch) | |
| tree | 2939f4fe0d06a1ad14ed8b676de99bfc314bc75c /src/services/create-notification.ts | |
| parent | フランス語と関西弁を有効に (#5925) (diff) | |
| download | sharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.tar.gz sharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.tar.bz2 sharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.zip | |
グループ招待の通知とか
Resolve #5880
Resolve #5927
Diffstat (limited to 'src/services/create-notification.ts')
| -rw-r--r-- | src/services/create-notification.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/services/create-notification.ts b/src/services/create-notification.ts index f9cf04dc69..c5c6e7144b 100644 --- a/src/services/create-notification.ts +++ b/src/services/create-notification.ts @@ -6,16 +6,18 @@ import { User } from '../models/entities/user'; import { Note } from '../models/entities/note'; import { Notification } from '../models/entities/notification'; import { FollowRequest } from '../models/entities/follow-request'; +import { UserGroupInvitation } from '../models/entities/user-group-invitation'; export async function createNotification( notifieeId: User['id'], notifierId: User['id'], - type: string, + type: Notification['type'], content?: { noteId?: Note['id']; reaction?: string; choice?: number; followRequestId?: FollowRequest['id']; + userGroupInvitationId?: UserGroupInvitation['id']; } ) { if (notifieeId === notifierId) { @@ -36,6 +38,7 @@ export async function createNotification( if (content.reaction) data.reaction = content.reaction; if (content.choice) data.choice = content.choice; if (content.followRequestId) data.followRequestId = content.followRequestId; + if (content.userGroupInvitationId) data.userGroupInvitationId = content.userGroupInvitationId; } // Create notification |