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:
parent
b0fcc11d9e
commit
e93e73673a
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue