diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 278e603e..fce41f36 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -258,6 +258,9 @@ class MatrixClient(nio.AsyncClient): # pylint: disable=unused-argument async def onRoomMessageText(self, room, ev, from_past=False) -> None: + if ev.event_id == "$1562605869886420ieZBa:matrix.org": + print("GOT DECRYPTED") + co = HTML_FILTER.filter( ev.formatted_body if ev.format == "org.matrix.custom.html" else html.escape(ev.body) @@ -402,6 +405,8 @@ class MatrixClient(nio.AsyncClient): async def onOlmEvent(self, room, ev, from_past=False) -> None: + if ev.event_id == "$1562605869886420ieZBa:matrix.org": + print(json.dumps( ev.__dict__ , indent=4)) co = f"%S hasn't sent your device the keys to decrypt this message." TimelineEventReceived.from_nio(room, ev, content=co) diff --git a/src/qml/EventHandlers/rooms.js b/src/qml/EventHandlers/rooms.js index 066d73cb..3e899755 100644 --- a/src/qml/EventHandlers/rooms.js +++ b/src/qml/EventHandlers/rooms.js @@ -109,7 +109,7 @@ function onTimelineEventReceived( "isLocalEcho": is_local_echo, "showNameLine": show_name_line, "translatable": translatable, - "tarfindId": target_user_id, + "targetUserId": target_user_id, } if (is_local_echo) { diff --git a/src/qml/utils.js b/src/qml/utils.js index 6b07042e..df4c6a4d 100644 --- a/src/qml/utils.js +++ b/src/qml/utils.js @@ -77,9 +77,9 @@ function translatedEventContent(ev) { var text = ev.content.replace("%S", coloredNameHtml(name, ev.senderId)) // %T → target (event state_key) display name - if (ev.tarfindId) { - var tname = users.find(ev.tarfindId).displayName - text = text.replace("%T", coloredNameHtml(tname, ev.tarfindId)) + if (ev.targetUserId) { + var tname = users.find(ev.targetUserId).displayName + text = text.replace("%T", coloredNameHtml(tname, ev.targetUserId)) } text = qsTr(text)