/// <summary> /// Create a new single or multi party instant message conversation. At least one user /// ID must be provided or an error response will be sent. The caller is implicitly /// included in the members of the created chat. Duplicate users will be included in /// the membership of the chat but the duplication will be silently ignored. /// If there is an existing IM conversation with the same set of participants then /// the id of that existing stream will be returned. /// </summary> /// <param name="userIdList">List of User IDs of participants.</param> /// <returns>The ID of the created stream.</returns> public string CreateStream(List <long> userIdList) { var uidList = new UserIdList(); uidList.AddRange(userIdList.Select(userId => (long?)userId)); var stream = _apiExecutor.Execute(_streamsApi.V1ImCreatePost, uidList, _authTokens.SessionToken); return(stream.Id); }
private void Apply(DayAssignMembersGroupAssigned e) { UserIdList = UserIdList ?? new List <Guid>(); GroupId = e.GroupId; TeamLeadId = e.TeamLeadId; IsAssignedToAllUsers = e.IsAssignedToAllUsers; UserIdList.AddRange(e.UserIdList); UserIdList = UserIdList.Distinct().ToList(); }