post interactions!
This commit is contained in:
parent
648f53f40c
commit
681ef74f95
11 changed files with 354 additions and 75 deletions
|
@ -5,9 +5,7 @@ export const EMOJI_REGEX = /:[\w\-.]{0,32}@[\w\-.]{0,32}:/g;
|
|||
export const EMOJI_NAME_REGEX = /:[\w\-.]{0,32}:/g;
|
||||
|
||||
export default class Emoji {
|
||||
id;
|
||||
name;
|
||||
host;
|
||||
url;
|
||||
|
||||
constructor(id, name, host, url) {
|
||||
|
@ -18,7 +16,10 @@ export default class Emoji {
|
|||
}
|
||||
|
||||
get html() {
|
||||
return `<img src="${this.url}" class="emoji" height="20" title="${this.name}" alt="${this.name}">`;
|
||||
if (this.url)
|
||||
return `<img src="${this.url}" class="emoji" height="20" title="${this.name}" alt="${this.name}">`;
|
||||
else
|
||||
return `${this.name}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue