Skip to content

Commit c1fd0a9

Browse files
ardianysshirioko
authored andcommitted
moving code for group name update notification
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>
1 parent 7ace84e commit c1fd0a9

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/whatsprot.class.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,20 +2069,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru
20692069
$node->getAttribute('t')
20702070
);
20712071
}
2072-
if ($node->getAttribute('type') == "subject") {
2073-
print_r($node);
2074-
$reset_from = explode('@', $node->getAttribute('from'));
2075-
$reset_author = explode('@',$node->getAttribute('author'));
2076-
$this->eventManager()->fireGetGroupsSubject(
2077-
$this->phoneNumber,
2078-
reset($reset_from),
2079-
$node->getAttribute('t'),
2080-
reset($reset_author),
2081-
reset($reset_author),
2082-
$node->getChild(0)->getAttribute('name'),
2083-
$node->getChild(2)->getData()
2084-
);
2085-
}
20862072
}
20872073
if ($node->getTag() == "presence" && $node->getAttribute("status") == "dirty") {
20882074
//clear dirty
@@ -2361,6 +2347,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru
23612347
//TODO
23622348
break;
23632349
case "subject":
2350+
$this->eventManager()->fireGetGroupsSubject(
2351+
$this->phoneNumber,
2352+
$node->getAttribute('from'),
2353+
$node->getAttribute('t'),
2354+
$node->getAttribute('participant'),
2355+
$node->getAttribute('participant'),
2356+
$node->getAttribute('notify'),
2357+
$node->getChild(0)->getData()
2358+
);
23642359
//TODO
23652360
break;
23662361
default:

0 commit comments

Comments
 (0)