diff --git a/src/components/Player.vue b/src/components/Player.vue index c89b9cc..7d73ea7 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -245,6 +245,7 @@ export default { prompt("Player preffered pronouns", this.player.pronoun) || this.player.pronoun; this.updatePlayer("pronoun", pronoun, true); + this.$emit("trigger", ["updatePlayer", this.player, "pronoun", pronoun]); }, toggleStatus() { if (this.grimoire.isPublic) { diff --git a/src/store/socket.js b/src/store/socket.js index 4da4a7c..9b368ec 100644 --- a/src/store/socket.js +++ b/src/store/socket.js @@ -222,6 +222,7 @@ class LiveSession { id: player.id, isDead: player.isDead, isVoteless: player.isVoteless, + pronoun: player.pronoun, ...(player.role && player.role.team === "traveler" ? { roleId: player.role.id } : {}) @@ -279,7 +280,7 @@ class LiveSession { const player = players[x]; const { roleId } = state; // update relevant properties - ["name", "id", "isDead", "isVoteless"].forEach(property => { + ["name", "id", "isDead", "isVoteless", "pronoun"].forEach(property => { const value = state[property]; if (player[property] !== value) { this._store.commit("players/update", { player, property, value });