Fix our echomail sender is not the message originator
This commit is contained in:
parent
944ae41fba
commit
fb2471a05b
@ -196,7 +196,7 @@ class MessageProcess implements ShouldQueue
|
|||||||
if (! $ea) {
|
if (! $ea) {
|
||||||
Log::alert(sprintf('%s:! Echoarea [%s] doesnt exist for zone [%d]',self::LOGKEY,$this->msg->echoarea,$this->msg->fboss_o->zone->zone_id));
|
Log::alert(sprintf('%s:! Echoarea [%s] doesnt exist for zone [%d]',self::LOGKEY,$this->msg->echoarea,$this->msg->fboss_o->zone->zone_id));
|
||||||
|
|
||||||
Notification::route('netmail',$this->msg->fftn_o)->notify(new EchoareaNotExist($this->msg));
|
Notification::route('netmail',$this->sender)->notify(new EchoareaNotExist($this->msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,15 +255,14 @@ class MessageProcess implements ShouldQueue
|
|||||||
// @todo Can the sender create it if it doesnt exist?
|
// @todo Can the sender create it if it doesnt exist?
|
||||||
|
|
||||||
// Can the system send messages to this area?
|
// Can the system send messages to this area?
|
||||||
if (! $ea->sec_write || ($this->msg->fftn_o->security < $ea->sec_write)) {
|
if (! $ea->sec_write || ($this->sender->security < $ea->sec_write)) {
|
||||||
Notification::route('netmail',$this->msg->fftn_o)->notify(new EchoareaNoWrite($this->msg));
|
Notification::route('netmail',$this->sender)->notify(new EchoareaNoWrite($this->msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the node is not subsccribed
|
// If the node is not subsccribed
|
||||||
if ($this->msg->fftn_o->echoareas->search(function($item) use ($ea) { return $item->id === $ea->id; }) === FALSE) {
|
if ($this->sender->echoareas->search(function($item) use ($ea) { return $item->id === $ea->id; }) === FALSE)
|
||||||
Notification::route('netmail',$this->msg->fftn_o)->notify(new EchoareaNotSubscribed($this->msg));
|
Notification::route('netmail',$this->sender)->notify(new EchoareaNotSubscribed($this->msg));
|
||||||
}
|
|
||||||
|
|
||||||
// We know about this area, store it
|
// We know about this area, store it
|
||||||
$o = new Echomail;
|
$o = new Echomail;
|
||||||
|
Loading…
Reference in New Issue
Block a user