Cannot publish presence when having databaseConfig.redis.keyPrefix #537
Description
I am working on multiple Laravel projects, denoted as "Project A" and "Project B".
I run laravel-echo-server for both projects.
Port 6001 for Project A
Port 6003 for Project B
Both have "databaseConfig.redis.publishPresence" enabled.
Authentication, joining and leaving channel, and Broadcasting (using Queue of Laravel) work totally fine.
However, whenever a user joins the echo server of Project A, both Project A and Project B show a "PresenceChannelUpdated" message (which I only want presence publishing from Project A solely), vice versa.
Channel: PresenceChannelUpdated
Event: [object Object]
To prevent this problem, I added keyPrefix to databaseConfig.redis for Project B.
"databaseConfig": {
"redis": {
"keyPrefix": "ProjectB_"
},
"publishPresence": true
},
Then the echo-server does not publish presence anymore, same case for Project A.
Without databaseConfig.redis.keyPrefix, it works totally fine.
With the keyPrefix, the echo-server doesn't publish presence anymore.
I also tried to use Redis database (e.g. db 0 for Project A, db 2 for Project B), but no luck with it.
Is this a bug or I am doing wrong? Any help would be appreciated.