forked from GNUsocial/gnu-social
check for self in forwards, too
darcs-hash:20080830085607-84dde-83e95d40d4d8a64a6bc223a0e91fec53022422c6.gz
This commit is contained in:
parent
6c42bdc448
commit
1cf81a57e4
@ -95,9 +95,9 @@ class XMPPDaemon {
|
|||||||
# Forwarded from another daemon (probably a broadcaster) for
|
# Forwarded from another daemon (probably a broadcaster) for
|
||||||
# us to handle
|
# us to handle
|
||||||
|
|
||||||
if (preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from))) {
|
if ($this->is_self($from)) {
|
||||||
$from = $this->get_ofrom($pl);
|
$from = $this->get_ofrom($pl);
|
||||||
if (is_null($from)) {
|
if (is_null($from) || $this->is_self($from)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -129,6 +129,10 @@ class XMPPDaemon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function is_self($from) {
|
||||||
|
return preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from));
|
||||||
|
}
|
||||||
|
|
||||||
function get_ofrom($pl) {
|
function get_ofrom($pl) {
|
||||||
$xml = $pl['raw'];
|
$xml = $pl['raw'];
|
||||||
$addresses = $xml->sub('addresses');
|
$addresses = $xml->sub('addresses');
|
||||||
|
Loading…
Reference in New Issue
Block a user