From fbd3d514e3a63e7762dd3ecfa51e95e8699d39d0 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 10 May 2022 21:35:34 -0400 Subject: [PATCH] Reformat output of "whoami" command Also print user pill for easily creating a MemoChat --- matrix_appservice_kakaotalk/commands/kakaotalk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matrix_appservice_kakaotalk/commands/kakaotalk.py b/matrix_appservice_kakaotalk/commands/kakaotalk.py index fe2b01a..a6ec9c5 100644 --- a/matrix_appservice_kakaotalk/commands/kakaotalk.py +++ b/matrix_appservice_kakaotalk/commands/kakaotalk.py @@ -65,9 +65,13 @@ async def whoami(evt: CommandEvent) -> None: await evt.reply(f"Error from KakaoTalk: {e}") return if own_info: + puppet = await pu.Puppet.get_by_ktid(evt.sender.ktid) uuid = f"`{own_info.more.uuid}` ({'searchable' if own_info.more.uuidSearchable else 'hidden'})" if own_info.more.uuid else "_none_" await evt.reply( - f"You're logged in as **{own_info.more.nickName}** (KakaoTalk ID: {uuid}, internal ID: `{evt.sender.ktid}`)" + f"You're logged in as **{own_info.more.nickName}**" + f"\n* KakaoTalk ID: {uuid}" + f"\n* Internal ID: `{evt.sender.ktid}`" + f"\n* Matrix user: [{puppet.name}](https://matrix.to/#/{puppet.default_mxid})" ) else: await evt.reply(