* added SSL and fixed XMPP_Old

git-svn-id: svn://netflint.net/xmpphp@51 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
fritzy
2008-07-25 21:39:09 +00:00
parent 1b39cfe6de
commit f7bb8d8f76
3 changed files with 25 additions and 8 deletions

View File

@@ -213,10 +213,10 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
$payload['from'] = $xml->attrs['from'];
$payload['status'] = (isset($xml->sub('status')->data)) ? $xml->sub('status')->data : '';
$this->log->log("Presence: {$payload['from']} [{$payload['show']}] {$payload['status']}", XMPPHP_Log::LEVEL_DEBUG);
if($xml->attrs['type'] == 'subscribe') {
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}' />");
$this->event('subscription_requested', $payload);
} elseif($xml->attrs['type'] == 'subscribed') {
} elseif(array_key_exists('type', $xml->attrs) and $xml->attrs['type'] == 'subscribed') {
$this->event('subscription_accepted', $payload);
} else {
$this->event('presence', $payload);