Merge pull request #1528 from thecodingmachine/api_chat_multiple_virtual_users
When there are many virtual users (generated by chat), only the name of a first user is displayed.
This commit is contained in:
commit
b6d571500e
@ -4,6 +4,7 @@
|
|||||||
- Moving a discussion over a user will now add this user to the discussion
|
- Moving a discussion over a user will now add this user to the discussion
|
||||||
- Being in a silent zone new forces mediaConstraints to false (#1508)
|
- Being in a silent zone new forces mediaConstraints to false (#1508)
|
||||||
- Fixes for the emote menu (#1501)
|
- Fixes for the emote menu (#1501)
|
||||||
|
- Fixing chat message attributed to wrong user (#1507 #1528)
|
||||||
|
|
||||||
## Version 1.5.0
|
## Version 1.5.0
|
||||||
### Updates
|
### Updates
|
||||||
|
@ -84,7 +84,7 @@ function createChatMessagesStore() {
|
|||||||
addExternalMessage(authorId: number, text: string) {
|
addExternalMessage(authorId: number, text: string) {
|
||||||
update((list) => {
|
update((list) => {
|
||||||
const lastMessage = list[list.length - 1];
|
const lastMessage = list[list.length - 1];
|
||||||
if (lastMessage && lastMessage.type === ChatMessageTypes.text && lastMessage.text) {
|
if (lastMessage && lastMessage.type === ChatMessageTypes.text && lastMessage.text && lastMessage?.author?.userId === authorId) {
|
||||||
lastMessage.text.push(text);
|
lastMessage.text.push(text);
|
||||||
} else {
|
} else {
|
||||||
list.push({
|
list.push({
|
||||||
|
@ -40,6 +40,7 @@ WA.chat.onChatMessage((message => {
|
|||||||
|
|
||||||
WA.room.onEnterZone('myTrigger', () => {
|
WA.room.onEnterZone('myTrigger', () => {
|
||||||
WA.chat.sendChatMessage("Don't step on my carpet!", 'Poly Parrot');
|
WA.chat.sendChatMessage("Don't step on my carpet!", 'Poly Parrot');
|
||||||
|
WA.chat.sendChatMessage("Yeah, don't step on her carpet!", 'Peter Parrot');
|
||||||
})
|
})
|
||||||
|
|
||||||
WA.room.onLeaveZone('popupZone', () => {
|
WA.room.onLeaveZone('popupZone', () => {
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
{
|
{
|
||||||
"fontfamily":"Sans Serif",
|
"fontfamily":"Sans Serif",
|
||||||
"pixelsize":11,
|
"pixelsize":11,
|
||||||
"text":"Test:\nWalk on top carpet\nResult:\nA message \"Don't step on my carpet\" is displayed",
|
"text":"Test:\nWalk on top carpet\nResult:\nA message \"Don't step on my carpet\" is displayed from Poly Parrot and another message from Peter Parrot",
|
||||||
"wrap":true
|
"wrap":true
|
||||||
},
|
},
|
||||||
"type":"",
|
"type":"",
|
||||||
|
Loading…
Reference in New Issue
Block a user