diff --git a/tinyweb_forum/handlers.py b/tinyweb_forum/handlers.py index 3ec6bb9..5875210 100644 --- a/tinyweb_forum/handlers.py +++ b/tinyweb_forum/handlers.py @@ -50,13 +50,20 @@ class ForumHandlers: return False return secrets.compare_digest(token, expected) - def _author_str(self, name, instance): + def _is_local(self, instance): if instance == "local": + return True + if self.identity and instance == self.identity.hash.hex(): + return True + return False + + def _author_str(self, name, instance): + if self._is_local(instance): return "me" return instance[:6] def _block_link(self, instance): - if instance == "local": + if self._is_local(instance): return "" return f' [block]'