Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Bug] sendChat('character|'+id, message) only partially functional

1377299190
Lithl
Pro
Sheet Author
API Scripter
The sendChat API function only partially works when the 'who' is a character. The message is posted to the chat with the correct 'by' text, but the character's avatar (if set) does not appear. If a player/GM with control of the character posts the same message manually, the avatar appears in the chat as normal. This problem does not occur when posting as a player -- sendChat('player|'+id, message) -- and if you post a message with an arbitrary name, there's no avatar to display anyway. Sample: on('ready', function(obj) {     var test = findObjs({_type:'character',name:'test character'})[0];     sendChat('character|'+test.id, 'this is a test'); // character "test character" will post "this is a test" but no avatar will show         test = findObjs({_type:'player'})[0];     sendChat('player|'+test.id, 'this is a test'); // first player will post "this is a test" and avatar will show });
1377299336
Gauss
Forum Champion
I have moved this to the API forum and added the Bug tag.  - Gauss