summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-05-27 21:11:56 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-05-27 21:12:06 +0800
commitc844fbd2c55a84d75d39f64b67c8ae0bda3f5492 (patch)
tree8bdea7ee9047f070162ebb649aa8c10d6fe92128
parent135684f1212ccba20324526485a3b66d42be32ca (diff)
session(newMessaeg): specify .sender = this
fix bug in 4c23d3224d1820e72f072b2e4017c963a5c40fcb where no .sender specified will dupe
-rw-r--r--src/session.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 7010acb..0eae525 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -89,7 +89,7 @@ void CSession::recvLoop() {
if (isCommand)
g_pCommandHandler->handleCommand(recvData->data, this);
- g_pChatManager->newMessage({.msg = recvData->data, .username = m_name, .admin = isCommand});
+ g_pChatManager->newMessage({.msg = recvData->data, .username = m_name, .sender = (uintptr_t)this, .admin = isCommand});
}
}