예제 #1
0
        private void Chat(object o)
        {
            var peer = o as Node;

            if (null != peer)
            {
                conversationController.CreateConversation(peer);
            }
        }
예제 #2
0
        public async Task SendMessage(string senderId, ConversationReadDTO message)
        {
            Debug.WriteLine("-----------------------------");
            Debug.WriteLine("message:");
            Debug.WriteLine(message.Message);
            Debug.WriteLine("senderId:");
            Debug.WriteLine(message.SenderId);
            Debug.WriteLine("status:");
            Debug.WriteLine(message.Status);
            Debug.WriteLine("recieverId:");
            Debug.WriteLine(message.RecieverId);
            Debug.WriteLine("createdAt:");
            Debug.WriteLine(message.CreatedAt);
            Debug.WriteLine("-----------------------------");
            Debug.WriteLine(senderId);



            await Clients.All.SendAsync("ReceiveMessage", message);

            await _conversationController.CreateConversation(_mapper.Map <ConversationCreateDTO>(message));
        }