Oyatel/CometD.NET — Issue #13: message.clientId is null ???
Author: MrGibbage
Created: 2012-01-16 01:31:21+00:00
State: open

Using the example code, the message received (IMessage), which has a clientId parameter, is always null. Should this not be containing the client ID of the sender? Thus, it should never be null??

public class Listener : IMessageListener
{
//private BayeuxClient client;
public void onMessage(IClientSessionChannel channel, IMessage message)
{
IDictionary ss = (IDictionary)message.DataAsDictionary;
String foo = (String)ss["foo"];
String senderClientId = message.ClientId; // is always null
if (senderClientId.Equals(Form1.clientId)) //should crash here
{
MessageBox.Show("I sent a message to myself");
}
else
{
MessageBox.Show(ss["foo"].ToString());
}
}
}