グループ招待の通知とか

Resolve #5880
Resolve #5927
This commit is contained in:
syuilo
2020-02-13 02:17:54 +09:00
parent 037d4b581b
commit 2feef81516
17 changed files with 163 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users, Notes } from '..';
import { Users, Notes, UserGroupInvitations } from '..';
import { Notification } from '../entities/notification';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
@@ -39,7 +39,10 @@ export class NotificationRepository extends Repository<Notification> {
...(notification.type === 'pollVote' ? {
note: Notes.pack(notification.note || notification.noteId!, notification.notifieeId),
choice: notification.choice
} : {})
} : {}),
...(notification.type === 'groupInvited' ? {
invitation: UserGroupInvitations.pack(notification.userGroupInvitationId!),
} : {}),
});
}