summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-29 20:03:14 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-29 20:03:14 -0400
commit9907a2101d8670a113444c95b2c98c2eec79c184 (patch)
treec2d7ce6cd23aaa6832b013065f1a4f90f07a2d48
parent9ad8f2766ca2ca59dba9f2b103c7e007d1afc07f (diff)
add 'raw' to payload to allow getting to the raw xml
darcs-hash:20080830000314-84dde-c83d970dbaf046fa37b4af13a23795abcc20e33b.gz
-rw-r--r--extlib/XMPPHP/XMPP.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/extlib/XMPPHP/XMPP.php b/extlib/XMPPHP/XMPP.php
index a69a647b0..d7783b516 100644
--- a/extlib/XMPPHP/XMPP.php
+++ b/extlib/XMPPHP/XMPP.php
@@ -198,6 +198,7 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
}
$payload['from'] = $xml->attrs['from'];
$payload['body'] = $xml->sub('body')->data;
+ $payload['raw'] = $xml;
$this->log->log("Message: {$xml->sub('body')->data}", XMPPHP_Log::LEVEL_DEBUG);
$this->event('message', $payload);
}
@@ -212,6 +213,7 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
$payload['show'] = (isset($xml->sub('show')->data)) ? $xml->sub('show')->data : $payload['type'];
$payload['from'] = $xml->attrs['from'];
$payload['status'] = (isset($xml->sub('status')->data)) ? $xml->sub('status')->data : '';
+ $payload['raw'] = $xml;
$this->log->log("Presence: {$payload['from']} [{$payload['show']}] {$payload['status']}", XMPPHP_Log::LEVEL_DEBUG);
if(array_key_exists('type', $xml->attrs) and $xml->attrs['type'] == 'subscribe') {
if($this->auto_subscribe) $this->send("<presence type='subscribed' to='{$xml->attrs['from']}' from='{$this->fulljid}' /><presence type='subscribe' to='{$xml->attrs['from']}' from='{$this->fulljid}' />");