miroslavpejic85 / mirotalksfu

🏆 WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences Up to 8k, compatible with all browsers and platforms.
https://sfu.mirotalk.com
GNU Affero General Public License v3.0
2.15k stars 340 forks source link

Private Messaging fail when new peer joins the room. #169

Closed Yeghro closed 4 weeks ago

Yeghro commented 4 weeks ago

Describe the bug

if 2 users are private messaging each other in a room and a new peer joins while they are in the middle of the private conversation, any message sent right after the new peer joins is sent to public chat rather than privately to the peer it was meant to be sent to.

Steps to reproduce

Create a room with 2 users and begin a private chat and keep the private chat window open while you open another tab or windows to login in with a third user. After logging in with the new (3rd user) go back to the private message window opened prior with the original users and send a private message.
Rather than it going to the intended peer, it will show in the public chat.

Expected behavior

The private message should only be sent to the intended peer and not public chat where anyone can see it.

Device

Browser

Relevant log output

No response

Reproducibility

Yes

Additional context

No response

miroslavpejic85 commented 4 weeks ago

mirotalk-sfu-private-messages-fix

Yeghro commented 4 weeks ago

My apologies. After testing again today I don't see the problem anymore. Must've been some mistake on my end.

miroslavpejic85 commented 4 weeks ago

My apologies. After testing again today I don't see the problem anymore. Must've been some mistake on my end.

The bug was indeed present as you described, but it has been fixed in this commit ;)

Yeghro commented 4 weeks ago

Oh that's great to hear. I was afraid I had made a mistake. Thank you.

Yeghro commented 4 days ago

Seem like this bug has return with your latest updates to the code. It happens in both public and private text chat.

miroslavpejic85 commented 3 days ago

In our Live demo?

Yeghro commented 3 days ago

In our Live demo?

Yes I tested it on sfu.mirotalk.com

open a chat between 2 peers , send a few messages and keep the chat window open, then enter in with a new 3rd user and go back to user 1 or user 2 and try to send a message. It refuses to send until you click on either public chat or a peer, after which it seems to work again.

https://github.com/user-attachments/assets/f79463c0-f49d-4ceb-b7bd-a7f8b2f4a744

miroslavpejic85 commented 3 days ago

Should be fixed, can you confirm? Thank you!

Yeghro commented 2 days ago

Confirmed fixed. Thank you.

Should be fixed, can you confirm? Thank you!