Exemplo n.º 1
0
        private void OnSendMessage(UserLogicModel user, SendChatMessageModel data)
        {
            var room = getRoomFromUser(user);
            if (room == null)
                throw new Exception("idk");

            myDataManager.ChatData.AddChatLine(user,
                                               room,
                                               data.Message,
                                               a => {
                                                   foreach (var userLogicModel in room.Users) {
                                                       myServerManager.SendChatLines(userLogicModel, new ChatMessagesModel(new List<ChatMessageRoomModel>() {a}));
                                                   }
                                               });
        }
 public void SendChatMessage(SendChatMessageModel sendChatMessageModel)
 {
     clientChatManager.SendChatMessage(sendChatMessageModel);
 }
 public void SendChatMessage(SendChatMessageModel sendChatMessageModel)
 {
     myGateway.Emit("Area.Chat.SendMessage", sendChatMessageModel);
 }