eliminate loops in forwarding
darcs-hash:20080830090148-84dde-2f5711a22c7e5a868005bb3188a966c0cdde30ab.gz
This commit is contained in:
parent
1cf81a57e4
commit
2860313f4b
|
@ -67,6 +67,10 @@ class XmppQueueHandler extends QueueHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$listener = $this->listener();
|
$listener = $this->listener();
|
||||||
|
if (strtolower($listener) == strtolower($pl['from'])) {
|
||||||
|
$this->log(LOG_WARNING, 'Ignoring loop message.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener);
|
$this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener);
|
||||||
$this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from']));
|
$this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from']));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue