You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use core:realtime:user:unsubscribe:after to generate a side effect. I do need to access subscription.kuid field, but when I refresh my browser page I don't have access to kuid which is null. Whereas I'm supposed to have the kuid.
From what I see, if you get the kuid to null instead of the value you need it is because Kuzzle has not been able to getKuidFromConnection. Maybe your sdk in your application isn't properly connected with the user upon refresh ? maybe your are calling the unsubscribe method to soon upon refresh ?
Are you able to make a small reproduction of the issue so we can work with that and check if it's really a bug ?
// backend sideglobal.kuzzle.on("core:realtime:user:subscribe:after",(data)=>{console.log("User subscribed to room",data);});global.kuzzle.on("core:realtime:user:unsubscribe:after",(data)=>{console.log("User unsubscribed from room",data);});// Front side of an applicationconstroomId=awaitthis.$kuzzle.realtime.subscribe("toto","tata",{},(notification)=>{console.log("Received notification",notification);});console.log("Room ID",roomId);awaitthis.$kuzzle.realtime.unsubscribe(roomId);
I properly get the kuid in the response object of the event core:realtime:user:unsubscribe:after like so
Hello,
Trying to use
core:realtime:user:unsubscribe:after
to generate a side effect. I do need to accesssubscription.kuid
field, but when I refresh my browser page I don't have access to kuid which isnull
. Whereas I'm supposed to have thekuid
.Related code :
Create (This is OK, kuid is present)
kuzzle/lib/core/realtime/hotelClerk.ts
Lines 290 to 298 in 96ac03b
This is not OK (kuid missing in unsubscribe)
kuzzle/lib/core/realtime/hotelClerk.ts
Lines 589 to 615 in 96ac03b
The text was updated successfully, but these errors were encountered: