diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-05 11:47:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-05 11:47:14 +0300 |
commit | 709dc2c6521ebced9cba68e0403342d81fa629dc (patch) | |
tree | 08f3a5d971eb5ef736738b4fa877e36464bd0234 /plugins/NewStory/src/history_array.cpp | |
parent | a86eeca5c766d0ddac08dde8573d7d54223b97b2 (diff) |
fixes #2386 (NewStory: передача файлов в истории)
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 83c44da0e0..3b8512738e 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -52,36 +52,20 @@ void ItemData::load(bool bFullLoad) bLoaded = true; switch (dbe.eventType) { - case EVENTTYPE_STATUSCHANGE: - wtext = mir_utf8decodeW((char*)dbe.pBlob); - break; - case EVENTTYPE_MESSAGE: - wtext = mir_utf8decodeW((char *)dbe.pBlob); - if (!(dbe.flags & DBEF_SENT)) { if (!dbe.markedRead()) db_event_markRead(hContact, hEvent); g_clistApi.pfnRemoveEvent(hContact, hEvent); } - break; + __fallthrough; - case EVENTTYPE_JABBER_PRESENCE: - wtext = DbEvent_GetTextW(&dbe, CP_ACP); - break; - - case EVENTTYPE_AUTHREQUEST: - if ((dbe.cbBlob > 8) && *(dbe.pBlob + 8)) - wtext = CMStringW(FORMAT, L"%s requested authorization", Utf2T((char*)dbe.pBlob + 8).get()).Detach(); - else - wtext = CMStringW(FORMAT, L"%d requested authorization", *(DWORD *)(dbe.pBlob)).Detach(); + case EVENTTYPE_STATUSCHANGE: + wtext = mir_utf8decodeW((char *)dbe.pBlob); break; - case EVENTTYPE_ADDED: - if ((dbe.cbBlob > 8) && *(dbe.pBlob + 8)) - wtext = CMStringW(FORMAT, L"%s added you to the contact list", Utf2T((char *)dbe.pBlob + 8).get()).Detach(); - else - wtext = CMStringW(FORMAT, L"%d added you to the contact list", *(DWORD *)(dbe.pBlob)).Detach(); + default: + wtext = DbEvent_GetTextW(&dbe, CP_ACP); break; } } |