src/Contact/Groups.php
public function addMember($groupUsername, $members)
    {
        if (!$groupUsername) {
            return false;
        }
        $group = $this->get($groupUsername);

        if (!$group) {
            return false;
        }

        $groupCount = count($group['MemberList']);
        list($fun, $key) = $groupCount > 40 ? ['invitemember', 'InviteMemberList'] : ['addmember', 'AddMemberList'];
        $members = is_string($members) ? [$members] : $members;

        $result = $this->vbot->http->json(sprintf('%s/webwxupdatechatroom?fun=%s&pass_ticket=%s', $this->vbot->config['server.uri.base'], $fun, $this->vbot->config['server.passTicket']), [
            'BaseRequest'  => $this->vbot->config['server.baseRequest'],
            'ChatRoomName' => $groupUsername,
            $key           => implode(',', $members),
        ], true);

        return $result['BaseResponse']['Ret'] == 0;
    }
public function addMember($groupUsername, $members)
    {
        if (!$groupUsername) {
            return false;
        }
        $group = $this->get($groupUsername);

        if (!$group) {
            return false;
        }

        $groupCount = count($group['MemberList']);
        list($fun, $key) = $groupCount > 40 ? ['invitemember', 'InviteMemberList'] : ['addmember', 'AddMemberList'];
        $members = is_string($members) ? [$members] : $members;

        $result = $this->vbot->http->json(sprintf('%s/webwxupdatechatroom?fun=%s&pass_ticket=%s', $this->vbot->config['server.uri.base'], $fun, $this->vbot->config['server.passTicket']), [
            'BaseRequest'  => $this->vbot->config['server.baseRequest'],
            'ChatRoomName' => $groupUsername,
            $key           => implode(',', $members),
        ], true);

        return $result['BaseResponse']['Ret'] == 0;
    }
添加群成员.

@param $groupUsername
@param $members

@return bool