From 2feef8151625d9ba5d9c8b1850679b7fe84af809 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 13 Feb 2020 02:17:54 +0900 Subject: グループ招待の通知とか MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #5880 Resolve #5927 --- src/services/create-notification.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/services') 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 -- cgit v1.2.3-freya