Closed leobragaz closed 2 years ago
@bragaz I found that GetEmojiByShortCodeOrValue
searches the emoji tables in emojidata.go
. It loses the shortcodes list so the error happens. The table in emojidata.go
should be updated to solve the problem.
I think it could have an error handling here to avoid the panic with the following check.
if len(emojiReact.Shortcodes) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "short code doesn't exist")
}
@dadamu I've digged into this more and found that somehow, the init()
function of the Go-Emoji-Utils
library (which is ours) it's not working. Basically shortcodes are not initialized, and this looks very weird since an init()
function should always be called...what do you think @dadamu ?
@bragaz I tried a while. init() function is run properly. However, the Emoji struct is not correct in the downloaded package and /data/emoji.json
is not included. The upstream release package should be updated.
Closing this as the x/posts
module will need to be implemented again anyway