public function _addContact($jid, $subscription, $name = '', $groups = [])
    {
        $contact = ['jid' => $jid, 'subscription' => $subscription, 'name' => $name, 'groups' => $groups];
        if ($this->isContact($jid)) {
            $this->roster_array[$jid]['contact'] = $contact;
        } else {
            $this->roster_array[$jid] = ['contact' => $contact];
        }
    }