Add support for custom emoji in reactions.

This seems to be working correctly, but element-desktop isn't rendering them,
not sure if that's expected or not.

Closes #4
This commit is contained in:
Gary Kramlich
2022-02-19 10:14:43 -06:00
parent 1c2dc8e9da
commit a51b1074ba
7 changed files with 232 additions and 16 deletions

View File

@@ -22,6 +22,7 @@ type Database struct {
Message *MessageQuery
Reaction *ReactionQuery
Attachment *AttachmentQuery
Emoji *EmojiQuery
}
func New(dbType, uri string, maxOpenConns, maxIdleConns int, baseLog log.Logger) (*Database, error) {
@@ -79,5 +80,10 @@ func New(dbType, uri string, maxOpenConns, maxIdleConns int, baseLog log.Logger)
log: db.log.Sub("Attachment"),
}
db.Emoji = &EmojiQuery{
db: db,
log: db.log.Sub("Emoji"),
}
return db, nil
}