Replace path from duplicate messages when the existing path is blank
This commit is contained in:
@@ -166,6 +166,14 @@ class MessageProcess implements ShouldQueue
|
||||
if (! $o->msg_crc)
|
||||
$o->msg_crc = md5($this->msg->message);
|
||||
|
||||
// Using filter here, due to earlier bugs - and to get rid of the null values
|
||||
$o->path = collect($o->getRawOriginal('path'))->filter()->toArray();
|
||||
|
||||
// If the path is empty, then its probably because of the previous bug, we'll replace it.
|
||||
// @todo This duplicate message may have gone via a different path, be nice to record it.
|
||||
if (! $o->path->count())
|
||||
$o->path = collect($o->getRawOriginal('path'))->merge($this->msg->pathaddress)->toArray();
|
||||
|
||||
$o->seenby = collect($o->getRawOriginal('seenby'))->merge($this->msg->seenaddress)->filter()->toArray();
|
||||
$o->save();
|
||||
|
||||
|
Reference in New Issue
Block a user