createStatusController: parse hashtags in text

This commit is contained in:
Alex Gleason 2024-04-06 19:15:59 -05:00
parent 7e7cf1df64
commit b031224fe5
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ const createStatusController: AppController = async (c) => {
return match;
});
for (const match of content.matchAll(/#(\w+)/g)) {
tags.push(['t', match[1]]);
}
const event = await createEvent({
kind: 1,
content,