private void OnGroupInvite(GroupInviteEventArgs args) { var handler = InvitedToGroup; if (handler != null) { handler(this, args); } }
private void OnGroupInviteMessage(MessageEventArgs <GroupInviteMessage> e) { Task.Factory.StartNew(s => { var msg = (GroupInviteMessage)s; var args = new GroupInviteEventArgs(msg.Group); OnGroupInvite(args); Connection.SendResponseAsync(msg, new GroupInviteResponseMessage { GroupId = msg.Group.Id, Response = (args.AcceptInvite) ? InvitationResponse.Accepted : InvitationResponse.Rejected }); }, e.Message); }
private void OnGroupInvite (GroupInviteEventArgs args) { var handler = InvitedToGroup; if (handler != null) handler (this, args); }
private void OnGroupInviteMessage (MessageEventArgs<GroupInviteMessage> e) { Task.Factory.StartNew (s => { var msg = (GroupInviteMessage)s; var args = new GroupInviteEventArgs (msg.Group); OnGroupInvite (args); Connection.SendResponseAsync (msg, new GroupInviteResponseMessage { GroupId = msg.Group.Id, Response = (args.AcceptInvite) ? InvitationResponse.Accepted : InvitationResponse.Rejected }); }, e.Message); }