dahlia/fedify

Tag and associated types: Hashtag, Mention, Emoji

Closed this issue · 3 comments

ActivityStreams specifies a Tag type to signify external references associated with an object. This type is used with several subtypes by current ActivityPub social platforms, all of which would be useful to have in Fedify.

  1. Mastodon uses the Hashtag type to declare in-band hashtags. According to Mastodon's documentation, this type was in an ActivityStreams vocabulary draft, but doesn't appear to have made it into the current spec. Adding support for it to Fedify would allow other servers to rewrite hashtag links in text content to lead clients to their home server's hashtag search instead of the origin server's. This is functionality that end users will expect to work.
  2. The Mention type in AS is not a subtype of Tag, but Mastodon nonetheless lists it in the object's tags collection. Fedify already contains support for Mention, although I have not tested it. It would be useful to be able to add Mentions to an object's tags collection, because this enables other servers such as Mastodon to rewrite mention-tagged links to external Actors to point to their local representation instead of to the originating server. This, again, is functionality expected by end users.
  3. Mastodon documents an extension for the Emoji type, a special tag mapping a text shorthand to an Image that clients can display inline. I'm not sure to what extent, if any, Mastodon enforces that the text shorthand must start and end with :, but it is the case for Mastodon servers. Supporting the Emoji type would enable Fedify servers to send activities including custom emoji, which would be appreciated by me and I'm sure also other server implementers.

After posting, I remembered that this draft report exists, which would specify Hashtag and a few other things unrelated to this issue. Might be relevant for #28 as well.

For Mentions, you can already put them in the tags collection.

Now you can use Hashtag and Emoji since Fedify 0.9.0-dev.172+738f84bf.