fix: tags received via AP should only be of type Hashtag (as mentions are also in tag prop

This commit is contained in:
Julian Lam
2024-03-07 15:11:43 -05:00
parent beaedc86aa
commit 81b81e540a

View File

@@ -259,7 +259,9 @@ Notes.assertTopic = async (uid, id) => {
let tags;
if (!hasTid) {
tags = (mainPost._activitypub.tag || []).map(o => o.name.slice(1));
tags = (mainPost._activitypub.tag || [])
.filter(o => o.type === 'Hashtag')
.map(o => o.name.slice(1));
tags = await topics.filterTags(tags, cid);
await topics.create({