Make messages unique and dedupe on reconnection
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user