summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history.h1
-rw-r--r--plugins/NewStory/src/history_array.cpp17
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) {