diff --git a/go.mod b/go.mod index 7a0932d..fc7787c 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b maunium.net/go/mauflag v1.0.0 maunium.net/go/maulogger/v2 v2.3.2 - maunium.net/go/mautrix v0.10.12 + maunium.net/go/mautrix v0.10.13-0.20220317230932-15d85fe4d3cc ) require ( diff --git a/go.sum b/go.sum index 4523cc2..2f461fd 100644 --- a/go.sum +++ b/go.sum @@ -197,5 +197,5 @@ maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= maunium.net/go/maulogger/v2 v2.3.2 h1:1XmIYmMd3PoQfp9J+PaHhpt80zpfmMqaShzUTC7FwY0= maunium.net/go/maulogger/v2 v2.3.2/go.mod h1:TYWy7wKwz/tIXTpsx8G3mZseIRiC5DoMxSZazOHy68A= -maunium.net/go/mautrix v0.10.12 h1:GqmsksKyKrTqmLb2B6yGOawoFLPTJ3A3NtXrygAvKM8= -maunium.net/go/mautrix v0.10.12/go.mod h1:xTq6+uMCAXtQwfqjUrYd8O10oIyymbzZm02CYOMt4ek= +maunium.net/go/mautrix v0.10.13-0.20220317230932-15d85fe4d3cc h1:7NNOnyCL03RWifzCko6QhVzn+gqS8DKRRtqCVBIKj7g= +maunium.net/go/mautrix v0.10.13-0.20220317230932-15d85fe4d3cc/go.mod h1:WqW8mruBue+1YrL/f04Ni/4R5yfLcgO8BQhUJzl7sps= diff --git a/portal.go b/portal.go index ae4cd5f..3adb15f 100644 --- a/portal.go +++ b/portal.go @@ -50,6 +50,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util" "maunium.net/go/mautrix/util/ffmpeg" + "maunium.net/go/mautrix/util/variationselector" "go.mau.fi/whatsmeow" waProto "go.mau.fi/whatsmeow/binary/proto" @@ -1461,7 +1462,7 @@ func (portal *Portal) HandleMessageReaction(intent *appservice.IntentAPI, user * content.RelatesTo = event.RelatesTo{ Type: event.RelAnnotation, EventID: target.MXID, - Key: reaction.GetText(), + Key: variationselector.Add(reaction.GetText()), } if intent.IsCustomPuppet { content.DoublePuppet = doublePuppetValue @@ -2789,6 +2790,7 @@ func (portal *Portal) sendReactionToWhatsApp(sender *User, id types.MessageID, t if !portal.IsPrivateChat() { messageKeyParticipant = proto.String(target.Sender.ToNonAD().String()) } + key = variationselector.Remove(key) return sender.Client.SendMessage(portal.Key.JID, id, &waProto.Message{ ReactionMessage: &waProto.ReactionMessage{ Key: &waProto.MessageKey{