display text next to emojis
This commit is contained in:
parent
49005c3468
commit
74a4f3152c
1 changed files with 12 additions and 4 deletions
|
@ -305,11 +305,12 @@ class Callbacks:
|
|||
|
||||
async def key_verification_confirm(self, event: KeyVerificationKey):
|
||||
sas = self.matrix_client.key_verifications[event.transaction_id]
|
||||
emoji_list = sas.get_emoji()
|
||||
emoji_str = " ".join(emoji for emoji, alt_text in emoji_list)
|
||||
emoji_list, alt_text_list = zip(*sas.get_emoji())
|
||||
emoji_str = " ".join(emoji_list)
|
||||
alt_text_str = " ".join(alt_text_list)
|
||||
|
||||
logger.info(
|
||||
f"Received request to verify emojis from {event.sender}: {emoji_str}"
|
||||
f"Received request to verify emojis from {event.sender}: {emoji_str} ({alt_text_str})"
|
||||
)
|
||||
|
||||
event_response = await self.matrix_client.confirm_short_auth_string(
|
||||
|
@ -338,7 +339,14 @@ class Callbacks:
|
|||
# )
|
||||
|
||||
async def key_verification_end(self, event: KeyVerificationMac):
|
||||
sas = self.matrix_client.key_verifications[event.transaction_id]
|
||||
try:
|
||||
sas = self.matrix_client.key_verifications[event.transaction_id]
|
||||
except KeyError:
|
||||
logger.error(
|
||||
f"Unable to find transaction ID {event.transaction_id} sent by {event.sender}"
|
||||
)
|
||||
return
|
||||
|
||||
try:
|
||||
todevice_msg = sas.get_mac()
|
||||
except LocalProtocolError as e:
|
||||
|
|
Loading…
Reference in a new issue