View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/647 Closes #686 and #696 Approved-by: Marie <github@yuugi.dev> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
a90b4d487a
11 changed files with 57 additions and 10 deletions
|
|
@ -351,6 +351,18 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
data.text = null;
|
||||
}
|
||||
|
||||
if (data.cw) {
|
||||
if (data.cw.length > DB_MAX_NOTE_TEXT_LENGTH) {
|
||||
data.cw = data.cw.slice(0, DB_MAX_NOTE_TEXT_LENGTH);
|
||||
}
|
||||
data.cw = data.cw.trim();
|
||||
if (data.cw === '') {
|
||||
data.cw = null;
|
||||
}
|
||||
} else {
|
||||
data.cw = null;
|
||||
}
|
||||
|
||||
let tags = data.apHashtags;
|
||||
let emojis = data.apEmojis;
|
||||
let mentionedUsers = data.apMentions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue