Skip to content

Commit

Permalink
moving code for group name update notification
Browse files Browse the repository at this point in the history
new group name update notification is like this
                    rx  <notification from="[email protected]" id="894086480" participant="[email protected]" type="subject" t="1407815452" notify="Ardian Yuli">
                    rx    <body>New Group Name</body>
                    rx  </notification>
  • Loading branch information
ardianys authored and shirioko committed Aug 12, 2014
1 parent 7ace84e commit c1fd0a9
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/whatsprot.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2069,20 +2069,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru
$node->getAttribute('t')
);
}
if ($node->getAttribute('type') == "subject") {
print_r($node);
$reset_from = explode('@', $node->getAttribute('from'));
$reset_author = explode('@',$node->getAttribute('author'));
$this->eventManager()->fireGetGroupsSubject(
$this->phoneNumber,
reset($reset_from),
$node->getAttribute('t'),
reset($reset_author),
reset($reset_author),
$node->getChild(0)->getAttribute('name'),
$node->getChild(2)->getData()
);
}
}
if ($node->getTag() == "presence" && $node->getAttribute("status") == "dirty") {
//clear dirty
Expand Down Expand Up @@ -2361,6 +2347,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru
//TODO
break;
case "subject":
$this->eventManager()->fireGetGroupsSubject(
$this->phoneNumber,
$node->getAttribute('from'),
$node->getAttribute('t'),
$node->getAttribute('participant'),
$node->getAttribute('participant'),
$node->getAttribute('notify'),
$node->getChild(0)->getData()
);
//TODO
break;
default:
Expand Down

0 comments on commit c1fd0a9

Please sign in to comment.