Include initial '@' in mention tag name

GoToSocial expects the 'name' value of a mention tag to have an initial '@' symbol. Mastodon doesn't seem to mind either way.
This commit is contained in:
Hugh Rundle 2023-04-10 20:38:20 +10:00
parent ef85394a16
commit c9dcd4f7ad

View file

@ -371,7 +371,7 @@ class TagField(ManyToManyField):
tags.append(
activitypub.Link(
href=item.remote_id,
name=getattr(item, item.name_field),
name=f"@{getattr(item, item.name_field)}",
type=activity_type,
)
)