Add members to chat room

@param roomId  chat room id
@param members username array
@return No content
@throws APIConnectionException connect exception
@throws APIRequestException    request exception
176860
public ResponseWrapper addChatRoomMember(long roomId, String... members)
            throws APIConnectionException, APIRequestException {
        Preconditions.checkArgument(roomId > 0, "room id is invalid");
        Preconditions.checkArgument(members != null && members.length > 0, "member should not be empty");
        JsonArray array = new JsonArray();
        for (String username : members) {
            array.add(new JsonPrimitive(username));
        }
        return _httpClient.sendPut(_baseUrl + mChatRoomPath + "/" + roomId + "/members", array.toString());
    }
651226
public void create(String roomName, String subject, HashMap<String, String> customConfigs, List<Jid> occupants)
            throws Exception {
        MUCLightCreateIQ createMUCLightIQ = new MUCLightCreateIQ(room, roomName, occupants);

        messageCollector = connection.createStanzaCollector(fromRoomGroupChatFilter);

        try {
            connection.createStanzaCollectorAndSend(createMUCLightIQ).nextResultOrThrow();
        } catch (NotConnectedException | InterruptedException | NoResponseException | XMPPErrorException e) {
            removeConnectionCallbacks();
            throw e;
        }
    }
132537
def room_members(self, stream_id):
        '''  '''
        req_hook = 'pod/v2/room/' + str(stream_id) + '/membership/list'
        req_args = None
        status_code, response = self.__rest__.GET_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
1026682
def channels_invite(self, room_id, user_id, **kwargs):
        """"""
        return self.__call_api_post('channels.invite', roomId=room_id, userId=user_id, kwargs=kwargs)
475785
private void createRoom(int index) {
        ApiRoom agent = agents[index];
        try {
            CreateRoomSettings settings = createRoomSettings(agent);
            User owner = CommandUtil.getSfsUser(agent.getOwner(), api);
            Room room = api.createRoom(extension.getParentZone(), settings, owner);
            room.setProperty(APIKey.ROOM, agent);
            agent.setId(room.getId());
            agent.setPasswordProtected(room.isPasswordProtected());
            agent.setCommand(context.command(RoomInfo.class).room(room.getId()));
        }
        catch (SFSCreateRoomException e) {
            throw new IllegalStateException("Can not create room " + agent.getName(), e);
        }
    }
25551
def room(id, &callback)
      http(:get, "/room/#{id}.json") do |data, http|
        Firering::Room.instantiate(self, data, :room, &callback)
      end
    end
520985
public void addMember(PdfLayer layer) {
        if (!layers.contains(layer)) {
            members.add(layer.getRef());
            layers.add(layer);
        }
    }
952194
public void addMembership(Membership membership) throws RedmineException {
		final Project project = membership.getProject();
		if (project == null)
			throw new IllegalArgumentException("Project must be set");
		if (membership.getUser() == null)
			throw new IllegalArgumentException("User must be set");
		transport.addChildEntry(Project.class, getProjectKey(project),
				membership);
	}
212326
def invite_user(self, room_id, user_id):
        
        body = {
            "user_id": user_id
        }
        return self._send("POST", "/rooms/" + room_id + "/invite", body)
751203
public function add(int $fd, $rooms)
    {
        $rooms = is_array($rooms) ? $rooms : [$rooms];

        $this->addValue($fd, $rooms, RoomContract::DESCRIPTORS_KEY);

        foreach ($rooms as $room) {
            $this->addValue($room, [$fd], RoomContract::ROOMS_KEY);
        }
    }
752438
@SuppressWarnings("unchecked")
    @Override
    public <T extends ApiRoom> T getRoomById(int id) {
        Room sfsRoom = getZone().getRoomById(id);
        if(sfsRoom != null && sfsRoom.containsProperty(APIKey.ROOM))
            return (T) sfsRoom.getProperty(APIKey.ROOM);
        return null;
    }
362372
public ChatRoomMemberList getChatRoomMembers(long roomId, int start, int count)
            throws APIConnectionException, APIRequestException {
        return _chatRoomClient.getChatRoomMembers(roomId, start, count);
    }
502586
public void addMembers(final List<String> memberIds, final AVIMConversationCallback callback) {
    if (null == memberIds || memberIds.size() < 1) {
      if (null != callback) {
        callback.done(new AVIMException(new IllegalArgumentException("memberIds is null")));
      }
      return;
    }
    Map<String, Object> params = new HashMap<String, Object>();
    params.put(Conversation.PARAM_CONVERSATION_MEMBER, memberIds);
    boolean ret = InternalConfiguration.getOperationTube().processMembers(this.client.getClientId(), this.conversationId,
            getType(), JSON.toJSONString(params), Conversation.AVIMOperation.CONVERSATION_ADD_MEMBER, callback);
    if (!ret && null != callback) {
      callback.internalDone(null,
              new AVException(AVException.OPERATION_FORBIDDEN, "couldn't start service in background."));
    }
  }
119683
def join_room(self, room_id_or_alias):
        
        if not room_id_or_alias:
            raise MatrixError("No alias or room ID to join.")

        path = "/join/%s" % quote(room_id_or_alias)

        return self._send("POST", path)
689694
def set_join_rule(self, room_id, join_rule):
        
        content = {
            "join_rule": join_rule
        }
        return self.send_state_event(room_id, "m.room.join_rules", content)
335903
public void updateMemberRole(final String memberId, final ConversationMemberRole role, final AVIMConversationCallback callback) {
    AVIMConversationMemberInfo info = new AVIMConversationMemberInfo(this.conversationId, memberId, role);
    Map<String, Object> params = new HashMap<String, Object>();
    params.put(Conversation.PARAM_CONVERSATION_MEMBER_DETAILS, info.getUpdateAttrs());
    boolean ret = InternalConfiguration.getOperationTube().processMembers(this.client.getClientId(), this.conversationId,
            getType(), JSON.toJSONString(params), Conversation.AVIMOperation.CONVERSATION_PROMOTE_MEMBER, callback);
    if (!ret && null != callback) {
      callback.internalDone(new AVException(AVException.OPERATION_FORBIDDEN, "couldn't start service in background."));
    }
  }
104586
public boolean add(final String member, final double score) {
        return doWithJedis(new JedisCallable<Boolean>() {
            @Override
            public Boolean call(Jedis jedis) {
                return jedis.zadd(getKey(), score, member) > 0;
            }
        });
    }