Make messages unique and dedupe on reconnection

This commit is contained in:
Gabe Kangas
2020-06-02 17:59:40 -07:00
parent f83fccfa89
commit ae94eb1c5f
3 changed files with 27 additions and 8 deletions

View File

@@ -3,17 +3,19 @@ class Message {
this.author = model.author
this.body = model.body
this.image = "https://robohash.org/" + model.author
this.id = model.id
}
linkedText() {
return autoLink(this.body, { embed: true })
}
toModel() {
return {
author: this.author(),
body: this.body(),
image: this.image()
image: this.image(),
id: this.id
}
}
}