mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Track up to 5 tags max per post
This commit is contained in:
parent
c88e58344f
commit
7eedeef2b4
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ function trackHashtags(event: Event): void {
|
||||||
|
|
||||||
const tags = event.tags
|
const tags = event.tags
|
||||||
.filter((tag) => tag[0] === 't')
|
.filter((tag) => tag[0] === 't')
|
||||||
.map((tag) => tag[1]);
|
.map((tag) => tag[1])
|
||||||
|
.slice(0, 5);
|
||||||
|
|
||||||
if (!tags.length) return;
|
if (!tags.length) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue