forked from FoundKeyGang/FoundKey
backend: Fix thread muting queries
findOne != findOneBy
This commit is contained in:
parent
87f1b0cabc
commit
2bb8642a2c
3 changed files with 3 additions and 3 deletions
|
@ -137,7 +137,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if this thread and notification type is muted
|
// check if this thread and notification type is muted
|
||||||
const threadMuted = await NoteThreadMutings.findOne({
|
const threadMuted = await NoteThreadMutings.findOneBy({
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
threadId: note.threadId || note.id,
|
threadId: note.threadId || note.id,
|
||||||
mutingNotificationTypes: ArrayOverlap(['pollVote']),
|
mutingNotificationTypes: ArrayOverlap(['pollVote']),
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default async function(user: CacheableUser, note: Note, choice: number) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if this thread and notification type is muted
|
// check if this thread and notification type is muted
|
||||||
const muted = await NoteThreadMutings.findOne({
|
const muted = await NoteThreadMutings.findOneBy({
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
threadId: note.threadId || note.id,
|
threadId: note.threadId || note.id,
|
||||||
mutingNotificationTypes: ArrayOverlap(['pollVote']),
|
mutingNotificationTypes: ArrayOverlap(['pollVote']),
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default async (user: { id: User['id']; host: User['host']; }, note: Note,
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if this thread is muted
|
// check if this thread is muted
|
||||||
const threadMuted = await NoteThreadMutings.findOne({
|
const threadMuted = await NoteThreadMutings.findOneBy({
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
threadId: note.threadId || note.id,
|
threadId: note.threadId || note.id,
|
||||||
mutingNotificationTypes: ArrayOverlap(['reaction']),
|
mutingNotificationTypes: ArrayOverlap(['reaction']),
|
||||||
|
|
Loading…
Reference in a new issue