Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="clientId"></param>
        /// <returns></returns>
        public Task <bool> AddMembersAsync(string clientId)
        {
            var cmd = new ConversationCommand()
                      .ConId(this.ConversationId)
                      .Member(clientId)
                      .Option("add")
                      .AppId(AVClient.ApplicationId)
                      .PeerId(clientId);
            var memberList = new List <string>()
            {
                clientId
            };

            return(CurrentClient.AttachSignature(cmd, CurrentClient.SignatureFactory.CreateConversationSignature(this.ConversationId, CurrentClient.clientId, memberList, "invite")).OnSuccess(_ =>
            {
                return AVIMClient.AVCommandRunner.RunCommandAsync(cmd).OnSuccess(t =>
                {
                    return t.Result.Item2.ContainsKey("added");
                });
            }).Unwrap());
        }