public void onMessage(string msg) { CybergameSocketMessage socketMessage = JsonConvert.DeserializeObject <CybergameSocketMessage>(msg); CybergameMessage chatMessage = new CybergameMessage { Name = socketMessage.From, Text = socketMessage.Text, ToName = socketMessage.Text.Contains(channelName) ? channelName : "" }; messageReceived(this, chatMessage); }
public void onMessage(string msg){ CybergameSocketMessage socketMessage = JsonConvert.DeserializeObject<CybergameSocketMessage>(msg); CybergameMessage chatMessage = new CybergameMessage { Name = socketMessage.From, Text = socketMessage.Text, ToName = socketMessage.Text.Contains(channelName) ? channelName : "" }; messageReceived(this, chatMessage); }