probably more correct muting logic
we want to notify if neither the thread nor the user are muted; otherwise, for example, notes in a muted thread from a non-muted user would get notified
This commit is contained in:
@@ -810,7 +810,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||||||
|
|
||||||
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
||||||
|
|
||||||
if (!isThreadMuted || !muted) {
|
if (!isThreadMuted && !muted) {
|
||||||
nm.push(data.reply.userId, 'reply');
|
nm.push(data.reply.userId, 'reply');
|
||||||
this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj);
|
this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj);
|
||||||
|
|
||||||
@@ -845,7 +845,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||||||
|
|
||||||
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
||||||
|
|
||||||
if (!isThreadMuted || !muted) {
|
if (!isThreadMuted && !muted) {
|
||||||
nm.push(data.renote.userId, type);
|
nm.push(data.renote.userId, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||||||
|
|
||||||
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
||||||
|
|
||||||
if (!isThreadMuted || !muted) {
|
if (!isThreadMuted && !muted) {
|
||||||
nm.push(data.reply.userId, 'reply');
|
nm.push(data.reply.userId, 'reply');
|
||||||
this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj);
|
this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj);
|
||||||
|
|
||||||
@@ -662,7 +662,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||||||
|
|
||||||
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
||||||
|
|
||||||
if (!isThreadMuted || !muted) {
|
if (!isThreadMuted && !muted) {
|
||||||
nm.push(data.renote.userId, type);
|
nm.push(data.renote.userId, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user