diff options
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index ac2bfd44ce..15b664fd95 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -88,10 +88,6 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
MEVENT hDbEvent = (MEVENT)lParam;
- DBEVENTINFO dbei = {};
- db_event_get(hDbEvent, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
- return 0;
HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd == nullptr)
@@ -99,6 +95,12 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) if (hwnd)
SendMessage(hwnd, HM_DBEVENTADDED, hContact, lParam);
+ DBEVENTINFO dbei = {};
+ db_event_get(hDbEvent, &dbei);
+
+ if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
+ return 0;
+
if (dbei.flags & DBEF_SENT || !DbEventIsMessageOrCustom(&dbei))
return 0;
|