summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-13 02:17:54 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-13 02:17:54 +0900
commit2feef8151625d9ba5d9c8b1850679b7fe84af809 (patch)
tree2939f4fe0d06a1ad14ed8b676de99bfc314bc75c /src/services
parentフランス語と関西弁を有効に (#5925) (diff)
downloadsharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.tar.gz
sharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.tar.bz2
sharkey-2feef8151625d9ba5d9c8b1850679b7fe84af809.zip
グループ招待の通知とか
Resolve #5880 Resolve #5927
Diffstat (limited to 'src/services')
-rw-r--r--src/services/create-notification.ts5
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