fix: Race condition with setting awareness field
This commit is contained in:
@@ -32,11 +32,7 @@ export default class Multiplayer extends Extension {
|
||||
}
|
||||
};
|
||||
|
||||
// only once we have authenticated successfully do we initalize awareness.
|
||||
// we could send this earlier, but getting authenticated faster is more important
|
||||
provider.on("authenticated", () => {
|
||||
provider.setAwarenessField("user", user);
|
||||
});
|
||||
provider.setAwarenessField("user", user);
|
||||
|
||||
// only once an actual change has been made do we add the userId <> clientId
|
||||
// mapping, this avoids stored mappings for clients that never made a change
|
||||
|
||||
Reference in New Issue
Block a user