v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
@ -5,6 +5,7 @@ import { genId } from '../misc/gen-id';
|
||||
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';
|
||||
|
||||
export async function createNotification(
|
||||
notifieeId: User['id'],
|
||||
@ -14,6 +15,7 @@ export async function createNotification(
|
||||
noteId?: Note['id'];
|
||||
reaction?: string;
|
||||
choice?: number;
|
||||
followRequestId?: FollowRequest['id'];
|
||||
}
|
||||
) {
|
||||
if (notifieeId === notifierId) {
|
||||
@ -33,6 +35,7 @@ export async function createNotification(
|
||||
if (content.noteId) data.noteId = content.noteId;
|
||||
if (content.reaction) data.reaction = content.reaction;
|
||||
if (content.choice) data.choice = content.choice;
|
||||
if (content.followRequestId) data.followRequestId = content.followRequestId;
|
||||
}
|
||||
|
||||
// Create notification
|
||||
|
Reference in New Issue
Block a user