From 27a552b8bf0f42af225e07b009d5b3e9c633e3fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Oct 2018 23:47:14 +0300 Subject: group chats: - GC_SHAREDUSERS removed; - SESSION_INFO::pParent used instead to collect data about shared user info - fix for SESSION_INFO::pMe calculation - Discord chats now go offline when proto goes offline --- include/m_chat.h | 1 - include/m_chat_int.h | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/m_chat.h b/include/m_chat.h index d6d2e398ae..978e1e1860 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -133,7 +133,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define GC_ACKMSG 0x0020 // the protocol must acknowlege messages sent #define GC_TYPNOTIF 0x0040 // enable typing notifications. #define GC_CHANMGR 0x0080 // enable the 'channel settings' button -#define GC_SHAREDUSERS 0x0100 // array of users is the same for all group chats // Error messages #define GC_ERROR 1 // An internal error occurred. diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 154edc854e..472d08cf8c 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -103,11 +103,9 @@ struct MIR_APP_EXPORT GCModuleInfoBase : public MZeroedObject, public MNonCopyab bool bBold, bItalics, bUnderline; bool bColor, bBkgColor; - bool bChanMgr, bAckMsg, bSharedUsers; + bool bChanMgr, bAckMsg; int iMaxText; - - OBJLIST arUsers; // for shared list of users }; struct COMMANDINFO @@ -180,15 +178,18 @@ struct MIR_APP_EXPORT GCSessionInfoBase : public MZeroedObject, public MNonCopya USERINFO *pMe; STATUSINFO *pStatuses; MODULEINFO *pMI; + GCSessionInfoBase *pParent; OBJLIST arUsers; wchar_t pszLogFileName[MAX_PATH]; + __forceinline USERINFO* getMe() const + { return (pParent != nullptr) ? pParent->pMe : pMe; + } + __forceinline OBJLIST& getUserList() - { - GCModuleInfoBase *mi = (GCModuleInfoBase*)pMI; - return (mi->bSharedUsers) ? mi->arUsers : arUsers; + { return (pParent != nullptr) ? pParent->arUsers : arUsers; } }; -- cgit v1.2.3