From 36f995ed20e94c89661f324fc720d8e5c7be6b65 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 30 Dec 2018 01:11:02 -0500 Subject: [PATCH] Add notification clear on private message display --- mod/message.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod/message.php b/mod/message.php index 0a80773c73..85ede744b9 100644 --- a/mod/message.php +++ b/mod/message.php @@ -339,6 +339,13 @@ function message_content(App $a) $messages = DBA::toArray($messages_stmt); DBA::update('mail', ['seen' => 1], ['parent-uri' => $message['parent-uri'], 'uid' => local_user()]); + + if ($message['convid']) { + // Clear Diaspora private message notifications + DBA::update('notify', ['seen' => 1], ['type' => NOTIFY_MAIL, 'parent' => $message['convid'], 'uid' => local_user()]); + } + // Clear DFRN private message notifications + DBA::update('notify', ['seen' => 1], ['type' => NOTIFY_MAIL, 'parent' => $message['parent-uri'], 'uid' => local_user()]); } else { $messages = false; } -- 2.39.5