From e35082bbea67c8779f49eea18fda0edf029429d9 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 2 May 2022 02:52:55 -0400 Subject: [PATCH] Improve "whoami", especially for users with no KakaoTalk ID Also show whether the KakaoTalk ID is searchable or not --- matrix_appservice_kakaotalk/commands/conn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix_appservice_kakaotalk/commands/conn.py b/matrix_appservice_kakaotalk/commands/conn.py index 6d351bd..9cda0f0 100644 --- a/matrix_appservice_kakaotalk/commands/conn.py +++ b/matrix_appservice_kakaotalk/commands/conn.py @@ -67,12 +67,13 @@ async def whoami(evt: CommandEvent) -> None: await evt.reply(f"Error from KakaoTalk: {e}") return if own_info: + uuid = f"`{own_info.more.uuid}` ({'' if own_info.more.uuidSearchable else 'not '}searchable)" if own_info.more.uuid else "_none_" await evt.reply( - f"You're logged in as `{own_info.more.uuid}` (nickname: {own_info.more.nickName}, user ID: {evt.sender.ktid})." + f"You're logged in as **{own_info.more.nickName}** (KakaoTalk ID: {uuid}, internal ID: `{evt.sender.ktid}`)" ) else: await evt.reply( - f"You're logged in, but the bridge is unable to retrieve your profile information (user ID: {evt.sender.ktid})." + f"You're logged in, but the bridge is unable to retrieve your profile information (internal ID: {evt.sender.ktid})" )