summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NoteEditService.ts
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-11-03 15:35:12 +0100
committerMar0xy <marie@kaifa.ch>2023-11-03 15:35:12 +0100
commit7c480424a60b9ebed52f5f928fb915af659110f0 (patch)
treef88524c83bde2611ae5bc95bf66769ca83a000ee /packages/backend/src/core/NoteEditService.ts
parentMerge branch 'develop' of https://github.com/transfem-org/Sharkey into develop (diff)
parentUpdate CHANGELOG.md (diff)
downloadsharkey-7c480424a60b9ebed52f5f928fb915af659110f0.tar.gz
sharkey-7c480424a60b9ebed52f5f928fb915af659110f0.tar.bz2
sharkey-7c480424a60b9ebed52f5f928fb915af659110f0.zip
merge: upstream
Diffstat (limited to 'packages/backend/src/core/NoteEditService.ts')
-rw-r--r--packages/backend/src/core/NoteEditService.ts19
1 files changed, 8 insertions, 11 deletions
diff --git a/packages/backend/src/core/NoteEditService.ts b/packages/backend/src/core/NoteEditService.ts
index 3cbf975e56..e88ab053e6 100644
--- a/packages/backend/src/core/NoteEditService.ts
+++ b/packages/backend/src/core/NoteEditService.ts
@@ -97,17 +97,14 @@ class NotificationManager {
}
@bindThis
- public async deliver() {
+ public async notify() {
for (const x of this.queue) {
- // ミュート情報を取得
- const mentioneeMutes = await this.mutingsRepository.findBy({
- muterId: x.target,
- });
-
- const mentioneesMutedUserIds = mentioneeMutes.map(m => m.muteeId);
-
- // 通知される側のユーザーが通知する側のユーザーをミュートしていない限りは通知する
- if (!mentioneesMutedUserIds.includes(this.notifier.id)) {
+ if (x.reason === 'renote') {
+ this.notificationService.createNotification(x.target, 'renote', {
+ noteId: this.note.id,
+ targetNoteId: this.note.renoteId!,
+ }, this.notifier.id);
+ } else {
this.notificationService.createNotification(x.target, x.reason, {
noteId: this.note.id,
}, this.notifier.id);
@@ -630,7 +627,7 @@ export class NoteEditService implements OnApplicationShutdown {
}
}
- nm.deliver();
+ nm.notify();
//#region AP deliver
if (this.userEntityService.isLocalUser(user)) {