示例#1
0
        public void RemoveFriendshipInvitation(long invitationId)
        {
            IInternalIncomingFriendInvitation internalIncomingFriendInvitation = RemoveIncomingFriendInvitation(invitationId);

            if (internalIncomingFriendInvitation != null)
            {
                internalIncomingFriendInvitation.Rejected();
            }
            else
            {
                RemoveOutgoingFriendInvitation(invitationId)?.Rejected();
            }
        }
示例#2
0
        public void RejectFriendInvitation(IIncomingFriendInvitation invitation, Action <IRejectFriendInvitationResult> callback)
        {
            IInternalIncomingFriendInvitation internalInvitation = incomingFriendInvitations.FirstOrDefault((IInternalIncomingFriendInvitation i) => i.Id == invitation.Id);

            if (internalInvitation == null)
            {
                logger.Critical("Friend invitation to reject not found");
                callback(new RejectFriendInvitationResult(success: false));
                return;
            }
            FriendInvitationRejecter.Reject(logger, notificationQueue, mixWebCallFactory, internalInvitation.InvitationId, delegate
            {
                RemoveIncomingFriendInvitation(internalInvitation.InvitationId);
                internalInvitation.Rejected();
                callback(new RejectFriendInvitationResult(success: true));
            }, delegate
            {
                callback(new RejectFriendInvitationResult(success: false));
            });
        }