Allow sending emoji using plaintext shortcodes in /react (#354)

This commit is contained in:
tleb 2022-03-30 14:21:26 +02:00 committed by GitHub
parent 2a07ff6781
commit 31e87b584f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -734,6 +734,9 @@ func (view *RoomView) Redact(eventID id.EventID, reason string) {
func (view *RoomView) SendReaction(eventID id.EventID, reaction string) {
defer debug.Recover()
if !view.config.Preferences.DisableEmojis {
reaction = emoji.Sprint(reaction)
}
debug.Print("Reacting to", eventID, "in", view.Room.ID, "with", reaction)
eventID, err := view.parent.matrix.SendEvent(&muksevt.Event{
Event: &event.Event{