From 815c3955dbd9ff7e1a427cf4bc66da38b581b178 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 21 May 2025 18:01:42 +0800 Subject: feat: join and leave message internal: refactored messaging management, use instnace pointer for verification of session --- src/IOManager.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/IOManager.hpp') diff --git a/src/IOManager.hpp b/src/IOManager.hpp index ba741ff..cc21a90 100644 --- a/src/IOManager.hpp +++ b/src/IOManager.hpp @@ -14,13 +14,16 @@ class CIOManager { std::string log; }; struct SIO { - // cannot have both at once - std::optional msg; - std::optional log; + // once a time + std::optional msg = std::nullopt; + std::optional log = std::nullopt; + std::optional> custom = std::nullopt; }; const std::vector &getIO() const; void addLog(const SLog &log); + void addMessage(const CChatManager::SMessage &msg); + void addCustom(const std::pair &custom); private: std::vector m_vIO; -- cgit v1.2.3