示例#1
0
 public Message ChannelDeleteSuccess(ServerClient currentClient, Message currentMessage, Channel currentChannel)
 {
     currentMessage = currentMessage.Redact();
     currentMessage.RecipientGUID = currentMessage.SenderGUID;
     currentMessage.SenderGUID    = ServerGUID;
     currentMessage.ChannelGUID   = currentChannel.ChannelGUID;
     currentMessage.CreatedUtc    = DateTime.Now.ToUniversalTime();
     currentMessage.Success       = true;
     currentMessage.SyncResponse  = currentMessage.SyncRequest;
     currentMessage.SyncRequest   = false;
     currentMessage.Data          = SuccessData.ToBytes("Successfully deleted channel", currentChannel.ChannelGUID);
     return(currentMessage);
 }
示例#2
0
        public Message ChannelDeletedByOwner(ServerClient currentClient, Channel currentChannel)
        {
            Message ResponseMessage = new Message();

            ResponseMessage.RecipientGUID = currentClient.ClientGUID;
            ResponseMessage.SenderGUID    = ServerGUID;
            ResponseMessage.ChannelGUID   = currentChannel.ChannelGUID;
            ResponseMessage.CreatedUtc    = DateTime.Now.ToUniversalTime();
            ResponseMessage.Success       = true;
            ResponseMessage.SyncResponse  = ResponseMessage.SyncRequest;
            ResponseMessage.SyncRequest   = false;
            ResponseMessage.Data          = SuccessData.ToBytes("Channel deleted by owner", currentChannel.ChannelGUID);
            return(ResponseMessage);
        }
示例#3
0
        public Message MessageQueueSuccess(ServerClient currentClient, Message currentMessage)
        {
            currentMessage = currentMessage.Redact();
            currentMessage.RecipientGUID = currentMessage.SenderGUID;
            currentMessage.SenderGUID    = ServerGUID;
            currentMessage.CreatedUtc    = DateTime.Now.ToUniversalTime();
            currentMessage.Success       = true;
            currentMessage.SyncResponse  = currentMessage.SyncRequest;
            currentMessage.SyncRequest   = false;

            if (!String.IsNullOrEmpty(currentMessage.RecipientGUID))
            {
                #region Individual-Recipient

                currentMessage.Data = SuccessData.ToBytes("Message queued to recipient", currentMessage.RecipientGUID);
                return(currentMessage);

                #endregion
            }
            else if (!String.IsNullOrEmpty(currentMessage.ChannelGUID))
            {
                #region Channel-Recipient

                currentMessage.Data = SuccessData.ToBytes("Message queued to channel", currentMessage.ChannelGUID);
                return(currentMessage);

                #endregion
            }
            else
            {
                #region Unknown-Recipient

                return(RecipientNotFound(currentClient, currentMessage));

                #endregion
            }
        }