mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 06:34:21 +02:00
fix: text min length is 1 (thanks mk)
This commit is contained in:
parent
df62b3786a
commit
645907851d
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ export class ApiStatusMastodon {
|
||||||
) {
|
) {
|
||||||
body = normalizeQuery(body);
|
body = normalizeQuery(body);
|
||||||
}
|
}
|
||||||
const text = body.status ? body.status : '';
|
const text = body.status ? body.status : ' ';
|
||||||
const removed = text.replace(/@\S+/g, '').replace(/\s|/g, '');
|
const removed = text.replace(/@\S+/g, '').replace(/\s|/g, '');
|
||||||
const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed);
|
const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed);
|
||||||
const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed);
|
const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed);
|
||||||
|
|
Loading…
Reference in a new issue