receiving my own private message

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
sirwin
Posts: 3
Joined: 15 Jun 2006, 20:06

receiving my own private message

Post by sirwin »

When I send out a private message it appears as it the message is also echoed back to me.

The folowing function is triggered and traces out the message I just sent and my user id

smartFox.onPrivateMessage = function(msg:String, sender:User)
{
trace("A private message from " + sender.getId() + " has arrived: " + msg)
}

The message is also received by the desired user.

Is this behavious correct??

Thank you
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Yes it is. This way you can correctly display it on screen or in the chat transcript when it's received.

To see it in action, check the provided example called "Advanced Chat"
Lapo
--
gotoAndPlay()
...addicted to flash games
allexiel
Posts: 46
Joined: 10 Jan 2006, 12:34

Post by allexiel »

sirwin, what I did in this case, and it's nice to have...
Is a cheack on PM wether the user ID is yours, and displayer something like:
"You sent" + msg
Post Reply