"to_email" => $importer["email"],
"uid" => $importer["importer_uid"],
"item" => $msg,
+ "parent" => $msg["parent-uri"],
"source_name" => $msg["from-name"],
"source_link" => $importer["url"],
"source_photo" => $importer["thumb"],
'created' => $msg_created_at
]);
+ $message_id = DBA::lastInsertId();
+
DBA::unlock();
DBA::update('conv', ['updated' => DateTimeFormat::utcNow()], ['id' => $conversation["id"]]);
"language" => $importer["language"],
"to_name" => $importer["username"],
"to_email" => $importer["email"],
- "uid" =>$importer["uid"],
- "item" => ["id" => $conversation["id"], "title" => $subject, "subject" => $subject, "body" => $body],
+ "uid" => $importer["uid"],
+ "item" => ["id" => $message_id, "title" => $subject, "subject" => $subject, "body" => $body],
+ "parent" => $conversation["id"],
"source_name" => $person["name"],
"source_link" => $person["url"],
"source_photo" => $person["photo"],
'created' => $created_at
]);
+ $message_id = DBA::lastInsertId();
+
DBA::unlock();
DBA::update('conv', ['updated' => DateTimeFormat::utcNow()], ['id' => $conversation["id"]]);
+
+ notification([
+ "type" => NOTIFY_MAIL,
+ "notify_flags" => $importer["notify-flags"],
+ "language" => $importer["language"],
+ "to_name" => $importer["username"],
+ "to_email" => $importer["email"],
+ "uid" => $importer["uid"],
+ "item" => ["id" => $message_id, "title" => $conversation["subject"], "subject" => $conversation["subject"], "body" => $body],
+ "parent" => $conversation["id"],
+ "source_name" => $person["name"],
+ "source_link" => $person["url"],
+ "source_photo" => $person["photo"],
+ "verb" => ACTIVITY_POST,
+ "otype" => "mail"
+ ]);
+
return true;
}