src/whatsprot.class.php
public function sendClearDirty($categories)
    {
        $msgId = $this->createIqId();

        $catnodes = [];
        foreach ($categories as $category) {
            $catnode = new ProtocolNode('clean', ['type' => $category], null, null);
            $catnodes[] = $catnode;
        }
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'type'  => 'set',
                'to'    => Constants::WHATSAPP_SERVER,
                'xmlns' => 'urn:xmpp:whatsapp:dirty',
            ], $catnodes, null);

        $this->sendNode($node);
    }
public function sendClearDirty($categories)
    {
        $msgId = $this->createIqId();

        $catnodes = [];
        foreach ($categories as $category) {
            $catnode = new ProtocolNode('clean', ['type' => $category], null, null);
            $catnodes[] = $catnode;
        }
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'type'  => 'set',
                'to'    => Constants::WHATSAPP_SERVER,
                'xmlns' => 'urn:xmpp:whatsapp:dirty',
            ], $catnodes, null);

        $this->sendNode($node);
    }
public function sendClearDirty ( $ categories ) { $ msgId = $ this -> createIqId ( ) ; $ catnodes = [ ] ; foreach ( $ categories as $ category ) { $ catnode = new ProtocolNode ( 'clean' , [ 'type' => $ category ] , null , null ) ; $ catnodes [ ] = $ catnode ; } $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgId , 'type' => 'set' , 'to' => Constants :: WHATSAPP_SERVER , 'xmlns' => 'urn:xmpp:whatsapp:dirty' , ] , $ catnodes , null ) ; $ this -> sendNode ( $ node ) ; }
Clears the "dirty" status on your account.

@param array $categories
Clears the dirty status on your account .