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
How Are You Using Foundry: Native Application (Electron)
Which Game System: pf2e (or any system which has a registered User subclass
Modules Enabled?: random assortment
Issue Description
This one is only explody when a user is kicked:
callback: li=>{constuser=game.users.get(li[0].dataset.userId);constrole=user.role;user.update({role: CONST.USER_ROLES.NONE}).then(u=>u.update({role}));ui.notifications.info(`${user.name} has been kicked from the world.`);}
When User#_onUpdate is called:
/** @inheritdoc */_onUpdate(data,options,userId){super._onUpdate(data,options,userId);// If the user role changed, we need to re-build the immutable User objectif(this.data.role!==this.role){constuser=newUser(this.data);// 😰game.users.remove(user.id);game.users.insert(user);// 😱
The second update from the context menu callback is never reached:
/** @inheritdoc */set(id,document){constcls=this.documentClass;// <-- UserPF2eif(!(documentinstanceofcls)){// 🤯thrownewError(`You may only push instances of ${cls.documentName} to the ${this.name} collection`);}returnsuper.set(document.id,document);}
The text was updated successfully, but these errors were encountered:
Originally in GitLab by @stwlam
Environment Details
User
subclassIssue Description
This one is only explody when a user is kicked:
When
User#_onUpdate
is called:The second update from the context menu callback is never reached:
The text was updated successfully, but these errors were encountered: