Add notification clear on private message display
This commit is contained in:
parent
3095d4aa70
commit
36f995ed20
1 changed files with 7 additions and 0 deletions
|
@ -339,6 +339,13 @@ function message_content(App $a)
|
||||||
$messages = DBA::toArray($messages_stmt);
|
$messages = DBA::toArray($messages_stmt);
|
||||||
|
|
||||||
DBA::update('mail', ['seen' => 1], ['parent-uri' => $message['parent-uri'], 'uid' => local_user()]);
|
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 {
|
} else {
|
||||||
$messages = false;
|
$messages = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue