diff --git a/takahe/models.py b/takahe/models.py index 384263c0..d4586992 100644 --- a/takahe/models.py +++ b/takahe/models.py @@ -850,6 +850,14 @@ class Identity(models.Model): } return result + def to_mastodon_mention_json(self): + return { + "id": str(self.pk), + "username": self.username or "", + "url": self.absolute_profile_uri() or "", + "acct": self.handle or "", + } + class Follow(models.Model): """