]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Mail.php
Merge pull request #10001 from annando/issue-9925
[friendica.git] / src / Model / Mail.php
index 12b4985526b9a9b137dfa7f07b84e36ce0f9e1d8..2a023c727cdad5f55480fb571c534f6d0b14b89b 100644 (file)
@@ -24,9 +24,8 @@ namespace Friendica\Model;
 use Friendica\Core\Logger;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
-use Friendica\DI;
 use Friendica\Database\DBA;
-use Friendica\Model\Notify\Type;
+use Friendica\DI;
 use Friendica\Protocol\Activity;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Worker\Delivery;
@@ -84,19 +83,12 @@ class Mail
 
                // send notifications.
                $notif_params = [
-                       'type' => Type::MAIL,
-                       'notify_flags' => $user['notify-flags'],
-                       'language' => $user['language'],
-                       'to_name' => $user['username'],
-                       'to_email' => $user['email'],
-                       'uid' => $user['uid'],
-                       'item' => $msg,
-                       'parent' => $msg['id'],
-                       'source_name' => $msg['from-name'],
-                       'source_link' => $msg['from-url'],
-                       'source_photo' => $msg['from-photo'],
-                       'verb' => Activity::POST,
-                       'otype' => 'mail'
+                       'type'  => Notification\Type::MAIL,
+                       'otype' => Notification\ObjectType::MAIL,
+                       'verb'  => Activity::POST,
+                       'uid'   => $user['uid'],
+                       'cid'   => $msg['contact-id'],
+                       'link'  => DI::baseUrl() . '/message/' . $msg['id'],
                ];
 
                notification($notif_params);