From ce760a800c6765009c4f49211b0a61c71756bfc0 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Fri, 12 Jan 2024 18:56:33 +0100 Subject: [PATCH] add self --- solanaceae/tox_messages/tox_message_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solanaceae/tox_messages/tox_message_manager.cpp b/solanaceae/tox_messages/tox_message_manager.cpp index 0f3af79..d9b3482 100644 --- a/solanaceae/tox_messages/tox_message_manager.cpp +++ b/solanaceae/tox_messages/tox_message_manager.cpp @@ -294,6 +294,8 @@ bool ToxMessageManager::onToxEvent(const Tox_Event_Group_Message* e) { reg.get_or_emplace(new_msg_e).ts.emplace(self_c, ts); } + reg.get_or_emplace(new_msg_e).ts.try_emplace(self_c, ts); + _rmm.throwEventConstruct(reg, new_msg_e); return false; // TODO: true? } @@ -340,6 +342,8 @@ bool ToxMessageManager::onToxEvent(const Tox_Event_Group_Private_Message* e) { reg.emplace(new_msg_e); // private does not track synced by + // but receive state + reg.get_or_emplace(new_msg_e).ts.try_emplace(self_c, ts); _rmm.throwEventConstruct(reg, new_msg_e); return false;