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
While it is possible to edit the document.root without attaching a document (with the default actor ID set to 000000000000000000000000), the presence changes is not working as expected. Although a presence-changed event occurs, the presence value is undefined, and user cannot get presence since document is not in an online status. Let's address this case for users who attempt editing before attaching.
constclient=newyorkie.Client(testRPCAddr);awaitclient.activate();constdoc=newyorkie.Document<DocumentType,PresenceType>(docKey);doc.subscribe('presence',(event)=>{console.log('d1 event',event);});// update presencedoc.update((root,p)=>{root.k1='v1';p.set({name: 'a'});});// and then attach document awaitclient.attach(doc,{initialPresence: {name: 'A'}});
Considerations:
Is it possible to ignore the initialPresence value when a presence value already exists?
Before attachment, the user can be considered offline. Current methods only retrieve presence for online clients, so we may need to introduce a method to retrieve presence including offline clients.
Why: Users can update presence before attaching a document.
The text was updated successfully, but these errors were encountered:
Description:
While it is possible to edit the
document.root
without attaching a document (with the default actor ID set to000000000000000000000000
), the presence changes is not working as expected. Although apresence-changed
event occurs, the presence value isundefined
, and user cannot get presence since document is not in an online status. Let's address this case for users who attempt editing before attaching.Considerations:
Why: Users can update presence before attaching a document.
The text was updated successfully, but these errors were encountered: