Dispatched when a message from a buddy is received by the current user.
SmartFox2X (in SmartFox2X.dll) Version: 220.127.116.11 (1.7.11)
public static readonly string BUDDY_MESSAGE
This event is fired in response to the BuddyMessageRequest
The same event is fired by the sender's client too, so that the user is aware that the message was delivered successfully to the recipient, and it can be displayed in the chat area keeping the correct message ordering.
As in this case the value of the buddy parameter is null
(because, being the sender, the user is not buddy to himself of course), there is no default way to know who the message was originally sent to.
As this information can be useful in scenarios where the sender is chatting with more than one buddy at the same time in separate windows or tabs (and we need to write his own message in the proper one),
the data parameter can be used to store, for example, the id of the recipient buddy.
object contains the following parameters:
|buddy||(Buddy) The object representing the message sender. If the isItMe parameter is true, the value of this parameter is null (because a user is not buddy to himself).|
|isItMe||(bool) true if the message sender is the current user himself (in this case this event is a sort of message delivery confirmation).|
|message||(string) The message text.|
|data||(ISFSObject) An object containing additional custom parameters (e.g. the message color, an emoticon id, etc).|Examples See Also