aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DReport.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/DReport.php')
-rw-r--r--Zotlabs/Lib/DReport.php52
1 files changed, 28 insertions, 24 deletions
diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php
index f4f098d19..71e39a9d7 100644
--- a/Zotlabs/Lib/DReport.php
+++ b/Zotlabs/Lib/DReport.php
@@ -8,22 +8,24 @@ class DReport {
private $recipient;
private $name;
private $message_id;
+ private $message_uuid;
private $status;
private $date;
- function __construct($location,$sender,$recipient,$message_id,$status = 'deliver') {
- $this->location = $location;
- $this->sender = $sender;
- $this->recipient = $recipient;
- $this->name = EMPTY_STR;
- $this->message_id = $message_id;
- $this->status = $status;
- $this->date = datetime_convert();
+ function __construct($location, $sender, $recipient, $message_id, $message_uuid = '', $status = 'deliver') {
+ $this->location = $location;
+ $this->sender = $sender;
+ $this->recipient = $recipient;
+ $this->name = EMPTY_STR;
+ $this->message_id = $message_id;
+ $this->message_uuid = $message_uuid;
+ $this->status = $status;
+ $this->date = datetime_convert();
}
function update($status) {
- $this->status = $status;
- $this->date = datetime_convert();
+ $this->status = $status;
+ $this->date = datetime_convert();
}
function set_name($name) {
@@ -36,24 +38,26 @@ class DReport {
function set($arr) {
- $this->location = $arr['location'];
- $this->sender = $arr['sender'];
- $this->recipient = $arr['recipient'];
- $this->name = $arr['name'];
- $this->message_id = $arr['message_id'];
- $this->status = $arr['status'];
- $this->date = $arr['date'];
+ $this->location = $arr['location'];
+ $this->sender = $arr['sender'];
+ $this->recipient = $arr['recipient'];
+ $this->name = $arr['name'];
+ $this->message_id = $arr['message_id'];
+ $this->message_uuid = $arr['message_uuid'] ?? '';
+ $this->status = $arr['status'];
+ $this->date = $arr['date'];
}
function get() {
return array(
- 'location' => $this->location,
- 'sender' => $this->sender,
- 'recipient' => $this->recipient,
- 'name' => $this->name,
- 'message_id' => $this->message_id,
- 'status' => $this->status,
- 'date' => $this->date
+ 'location' => $this->location,
+ 'sender' => $this->sender,
+ 'recipient' => $this->recipient,
+ 'name' => $this->name,
+ 'message_id' => $this->message_id,
+ 'message_uuid' => $this->message_uuid,
+ 'status' => $this->status,
+ 'date' => $this->date
);
}