|
|
@ -4,6 +4,7 @@ module.exports = class { |
|
|
|
shortName: "", |
|
|
|
name: "", |
|
|
|
text: "", |
|
|
|
nameSuffix: "", |
|
|
|
modal: null, |
|
|
|
removed: false, |
|
|
|
} |
|
|
@ -39,6 +40,7 @@ module.exports = class { |
|
|
|
updatePost(input) { |
|
|
|
this.state.shortName = input.post.nick.split("_").shift() |
|
|
|
this.state.name = input.post.nick |
|
|
|
this.state.nameSuffix = "" |
|
|
|
|
|
|
|
this.state.text = input.post.text.replace(/\x02/g, "**") |
|
|
|
|
|
|
@ -51,7 +53,15 @@ module.exports = class { |
|
|
|
for (const character of input.characters) { |
|
|
|
for (const nick of character.nicks) { |
|
|
|
if (nick === postNick) { |
|
|
|
this.state.name = character.name |
|
|
|
this.state.shortName = character.shortName |
|
|
|
|
|
|
|
if (input.post.nick.endsWith("'s")) { |
|
|
|
this.state.nameSuffix = "'s" |
|
|
|
} else if (input.post.nick.endsWith("'")) { |
|
|
|
this.state.nameSuffix = "'" |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|