onPrivateMessage Documentation

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
duncanhall
Posts: 29
Joined: 04 May 2008, 14:52
Contact:

onPrivateMessage Documentation

Post by duncanhall »

The documentation for the 'onPrivateMessage' method states that four parameters are received as:

Code: Select all

message:String, sender:User, roomId:Number, userId:Number
However, after bashing my head and digging around in the code for a while, I found the actualy implementation of this method:

Code: Select all

scope.onPrivateMessage(textMsg.toString(), scope.roomList[fromRoom].userList[usrId], usrId, fromRoom)
The last two parameters should be swapped around in the documetnation.
foyb2
Posts: 1
Joined: 12 Nov 2008, 08:52

Re: onPrivateMessage Documentation

Post by foyb2 »

duncanhall wrote:The documentation for the 'onPrivateMessage' method states that four parameters are received as:

Code: Select all

message:String, sender:User, roomId:Number, userId:Number
However, after bashing my head and digging around in the code for a while, I found the actualy implementation of this method:

Code: Select all

scope.onPrivateMessage(textMsg.toString(), scope.roomList[fromRoom].userList[usrId], usrId, fromRoom)
The last two parameters should be swapped around in the documetnation.
hi,

had the same problem here. PLEASE update your documentation, i use the AS2 API ...
Kenn
Posts: 9
Joined: 03 Apr 2009, 12:25

Post by Kenn »

Seeing how this post is few months old ill stress this issue again, please do look over the docs!

roomId traces userId, and the other way around. This is very confusing..
Post Reply