Open yupix opened 10 months ago
あんまりMisskeyに無い属性をモデルに追加したくないけど利便性を考えるとあってもいい気がする
def get_profile_link( self, external: bool = True, protocol: Literal["http", "https"] = "https", ): if not self._user: return None host = ( f"{protocol}://{self._user.host}" if external and self._user.host else self._session._url ) path = ( f"/@{self._user.username}" if external else f"/{self._user.api.action.get_mention()}" ) return host + path
Summary
あんまりMisskeyに無い属性をモデルに追加したくないけど利便性を考えるとあってもいい気がする