diff options
| author | Marie <marie@kaifa.ch> | 2024-02-03 17:25:17 +0000 |
|---|---|---|
| committer | Marie <marie@kaifa.ch> | 2024-02-03 17:25:17 +0000 |
| commit | 75bce2228f14b7ac859a1b09a15ae5f426773b74 (patch) | |
| tree | 4aa4c180e75df0bf6e439ca7789f283e0915febf /packages/backend/src/core/NoteCreateService.ts | |
| parent | merge: follow-up to !390 (!397) (diff) | |
| parent | probably more correct muting logic (diff) | |
| download | sharkey-75bce2228f14b7ac859a1b09a15ae5f426773b74.tar.gz sharkey-75bce2228f14b7ac859a1b09a15ae5f426773b74.tar.bz2 sharkey-75bce2228f14b7ac859a1b09a15ae5f426773b74.zip | |
merge: some fixes to NoteEdit and muting (!376)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/376
Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
Approved-by: Luna <her@mint.lgbt>
Approved-by: Marie <marie@kaifa.ch>
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 419e58ec62..52e8795c37 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -328,6 +328,9 @@ export class NoteCreateService implements OnApplicationShutdown { data.text = data.text.slice(0, DB_MAX_NOTE_TEXT_LENGTH); } data.text = data.text.trim(); + if (data.text === '') { + data.text = null; + } } else { data.text = null; } @@ -807,7 +810,7 @@ export class NoteCreateService implements OnApplicationShutdown { const muted = isUserRelated(note, userIdsWhoMeMuting); - if (!isThreadMuted || !muted) { + if (!isThreadMuted && !muted) { nm.push(data.reply.userId, 'reply'); this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj); @@ -842,7 +845,7 @@ export class NoteCreateService implements OnApplicationShutdown { const muted = isUserRelated(note, userIdsWhoMeMuting); - if (!isThreadMuted || !muted) { + if (!isThreadMuted && !muted) { nm.push(data.renote.userId, type); } } |