Help - Search - Members - Calendar
Full Version: Have chat message problem with ActiveS
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
holybible
Hi, All:

I have some CHAT problem with ActiveS.
The scenario is I dont want to use chat window which is original from Skype.

The problem is that I use MessageRecieved event handler to deal with incoming chat message called msg.
When a message coming, I tried to use msg to get the message and use function AccessClass.GetChatMessage(msg.ID) to find out this message is from whom and is belonged to which chat.
But I failed becoz the function will return a franmentized chat message object, which only have a part of NAME, BODY, etc.

Does anyone know why? Plz help me, I will very appreciate your answers.
holybible
QUOTE(holybible @ Fri Sep 15 2006, 05:38) [snapback]297841[/snapback]

Hi, All:

I have some CHAT problem with ActiveS.
The scenario is I dont want to use chat window which is original from Skype.

The problem is that I use MessageRecieved event handler to deal with incoming (chat)message called msg. (ChatMessageRecieved event handler doesn't work at all!!)
When a message coming, I tried to use msg to get the message and use function AccessClass.GetChatMessage(msg.ID) to find out this message is from whom and is belonged to which chat.
But I failed becoz the function will return a franmentized chat message object, which only have a part of NAME, BODY, etc.

Does anyone know why? Plz help me, I will very appreciate your answers.


Hi, All:

Now after serveral tests I can tell this problem more precisely:
If I use msg.ID to query the original CHATMESSAGE (that is, if I want to make a MESSAGE become a CHATMESSAGE), the returned CHATMESSAGE object will lose the first four bytes for some properties like Body or PartnerHandle, and other properties occur exceptions. Therefore I can't retrieve the Chat object of this message.
Is it possible to know the Chat object which the message I received is belonged to?
holybible
QUOTE(holybible @ Fri Sep 15 2006, 06:51) [snapback]297850[/snapback]

Hi, All:

Now after serveral tests I can tell this problem more precisely:
If I use msg.ID to query the original CHATMESSAGE (that is, if I want to make a MESSAGE become a CHATMESSAGE), the returned CHATMESSAGE object will lose the first four bytes for some properties like Body or PartnerHandle, and other properties occur exceptions. Therefore I can't retrieve the Chat object of this message.
Is it possible to know the Chat object which the message I received is belonged to?

I have solved this problem now, although it is a stupid way.
The answer is that list all chat objects you have, then query the message list of each chat object.
You will surely find this message obeject is belonged to the certain chat object, and you can find the
chat message with message.ID and Chat object.

I wish Skype or ActiveS will do some change about this, or this is the only way I can find. nerd.png
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.