mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
createStatusController: parse hashtags in text
This commit is contained in:
parent
7e7cf1df64
commit
b031224fe5
1 changed files with 4 additions and 0 deletions
|
|
@ -112,6 +112,10 @@ const createStatusController: AppController = async (c) => {
|
||||||
return match;
|
return match;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
for (const match of content.matchAll(/#(\w+)/g)) {
|
||||||
|
tags.push(['t', match[1]]);
|
||||||
|
}
|
||||||
|
|
||||||
const event = await createEvent({
|
const event = await createEvent({
|
||||||
kind: 1,
|
kind: 1,
|
||||||
content,
|
content,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue