diff options
author | George Hazan <george.hazan@gmail.com> | 2023-08-07 19:28:34 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-08-07 19:28:34 +0300 |
commit | 8bba5bfd2f666f5b6b9663945435d0b8aa8039c1 (patch) | |
tree | b8f84d34209ba4e94cc411bf064a93c1c8b37a8e /plugins | |
parent | c3cb0acccd9d3585db20333ed02a7c3752b48c7a (diff) |
fixes #3626 (NewStory: нет настройки цвета для входов/выходов в чате)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewStory/src/history.h | 1 | ||||
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/plugins/NewStory/src/history.h b/plugins/NewStory/src/history.h index 4fc1bd8220..d93cd6dd3c 100644 --- a/plugins/NewStory/src/history.h +++ b/plugins/NewStory/src/history.h @@ -1,6 +1,7 @@ #ifndef __history_h__ #define __history_h__ +#define EVENTTYPE_OTHER 12345 #define EVENTTYPE_STATUSCHANGE 25368 #define EVENTTYPE_JABBER_PRESENCE 2001 diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 6bdd4a74f2..6dc88046e3 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -318,9 +318,24 @@ void HistoryArray::addChatEvent(SESSION_INFO *si, LOGINFO *lin) p.hContact = si->hContact; p.wtext = wszText.Detach(); p.m_bLoaded = true; - p.dbe.eventType = EVENTTYPE_MESSAGE; p.dbe.timestamp = lin->time; + switch (lin->iType) { + case GC_EVENT_MESSAGE: + case GC_EVENT_TOPIC: + case GC_EVENT_INFORMATION: + p.dbe.eventType = EVENTTYPE_MESSAGE; + break; + + case GC_EVENT_SETCONTACTSTATUS: + p.dbe.eventType = EVENTTYPE_STATUSCHANGE; + break; + + default: + p.dbe.eventType = EVENTTYPE_OTHER; + break; + } + if (lin->ptszNick) { p.wszNick = strings.find(lin->ptszNick); if (p.wszNick == nullptr) { |