Blocking someone removes notifications between you
Also note in the CI guide that the build caches need disk space where Docker keeps its data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { and, desc, eq, gt, inArray, isNull, lt } from 'drizzle-orm';
|
||||
import { and, desc, eq, gt, inArray, isNull, lt, or } from 'drizzle-orm';
|
||||
import webpush from 'web-push';
|
||||
import {
|
||||
notificationPath,
|
||||
@@ -61,6 +61,12 @@ export async function notify(input: {
|
||||
return row!.id;
|
||||
}
|
||||
|
||||
/** After a block: neither sees notifications from the other any more. */
|
||||
export async function removeNotificationsBetween(a: string, b: string) {
|
||||
const n = schema.notifications;
|
||||
await db.delete(n).where(or(and(eq(n.userId, a), eq(n.actorId, b)), and(eq(n.userId, b), eq(n.actorId, a))));
|
||||
}
|
||||
|
||||
/** Take back a reaction's notification when the reaction is removed (if it hasn't been seen). */
|
||||
export async function unnotifyReaction(userId: string, actorId: string, listenId: string) {
|
||||
const n = schema.notifications;
|
||||
|
||||
Reference in New Issue
Block a user