]> git.mxchange.org Git - friendica.git/commitdiff
Iissue 8560: Wrong value for parent in mail notification
authorMichael <heluecht@pirati.ca>
Tue, 28 Apr 2020 20:32:39 +0000 (20:32 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 28 Apr 2020 20:32:39 +0000 (20:32 +0000)
mod/message.php
src/Model/Mail.php

index c62a15eb233d21addfc03e86655097158dd3c4ce..c024cbe144cd49eaaa31e80ee1f7064d6b6222c9 100644 (file)
@@ -352,13 +352,7 @@ 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' => Type::MAIL, 'parent' => $message['convid'], 'uid' => local_user()]);
-                       }
-                       // Clear DFRN private message notifications
-                       DBA::update('notify', ['seen' => 1], ['type' => Type::MAIL, 'parent' => $message['parent-uri'], 'uid' => local_user()]);
+                       DBA::update('notify', ['seen' => 1], ['type' => Type::MAIL, 'parent' => $message['id'], 'uid' => local_user()]);
                } else {
                        $messages = false;
                }
index c0efe4f2334138f60cb3e118b64141588342c923..848b419bef88affa4a7a4504e2b9c1f8b94f1c47 100644 (file)
@@ -92,7 +92,7 @@ class Mail
                        'to_email' => $user['email'],
                        'uid' => $user['uid'],
                        'item' => $msg,
-                       'parent' => 0,
+                       'parent' => $msg['id'],
                        'source_name' => $msg['from-name'],
                        'source_link' => $msg['from-url'],
                        'source_photo' => $msg['from-photo'],