Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation Viewers Not Updating Properly #4548

Closed
pvujic opened this issue Feb 5, 2025 · 3 comments
Closed

Conversation Viewers Not Updating Properly #4548

pvujic opened this issue Feb 5, 2025 · 3 comments

Comments

@pvujic
Copy link

pvujic commented Feb 5, 2025

Description:
The conversation viewers are not properly updating in FreeScout. I created two test users (PV and PC) to replicate the issue. Initially, both profiles are displayed correctly in the conversation, showing who is currently viewing it. However, after approximately one minute, one of the users disappears for the other, and after that, the second user can no longer see the first user.

Steps to Reproduce:
Create two users (e.g., PV and PC).
Enter the same conversation with both users.
Confirm that both users are displayed as viewers.
Wait for about a minute.
Observe that one user disappears from the viewer list.
The second user is no longer able to see the first user in the viewer list.

Expected Behavior:
Both users should remain visible in the viewer list as long as they are actively viewing the conversation.

Actual Behavior (Left Browser 1, Right Browser 2):
After a short period, one user disappears from the viewer list.
Image
After another short period, no users are displayed anymore, despite still being in the conversation.
Image

Environment Details:
PHP version: 8.3.6
FreeScout version: 1.8.168
Database: MySQL
Are you using CloudFlare: Yes (dns only / gray cloud)
Are you using non-official modules: Yes

@freescout-help
Copy link
Collaborator

It's a know thing. If the user starts to reply, his/her avatar will be shown again.

It happens because it has been decided not to send here https://github.com/freescout-help-desk/freescout/blob/dist/app/Providers/PolycastServiceProvider.php#L155 the RealtimeConvView event every 15 seconds like this:

} else {
	\App\Events\RealtimeConvView::dispatchSelf($viewing_conversation_id, $user, (int)$request->data['replying']);
}

Because it would fill up the polycast_events table when any user is viewing a conversation.

Image

@pvujic
Copy link
Author

pvujic commented Feb 8, 2025

@freescout-help
We will create a custom module to modify this and see how it goes.

Thank you.

@pvujic pvujic closed this as completed Feb 8, 2025
@freescout-help
Copy link
Collaborator

Sure. You can also implement it as .env file parameter and submit as PR. It's up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants