|
@@ -4038,7 +4038,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event, timing
|
|
}
|
|
}
|
|
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp", info.ID)
|
|
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp", info.ID)
|
|
start = time.Now()
|
|
start = time.Now()
|
|
- resp, err := sender.Client.SendMessage(ctx, portal.Key.JID, info.ID, msg)
|
|
|
|
|
|
+ resp, err := sender.Client.SendMessage(ctx, portal.Key.JID, msg, whatsmeow.SendRequestExtra{ID: info.ID})
|
|
timings.totalSend = time.Since(start)
|
|
timings.totalSend = time.Since(start)
|
|
timings.whatsmeow = resp.DebugTimings
|
|
timings.whatsmeow = resp.DebugTimings
|
|
go ms.sendMessageMetrics(evt, err, "Error sending", true)
|
|
go ms.sendMessageMetrics(evt, err, "Error sending", true)
|
|
@@ -4100,7 +4100,7 @@ func (portal *Portal) sendReactionToWhatsApp(sender *User, id types.MessageID, t
|
|
messageKeyParticipant = proto.String(target.Sender.ToNonAD().String())
|
|
messageKeyParticipant = proto.String(target.Sender.ToNonAD().String())
|
|
}
|
|
}
|
|
key = variationselector.Remove(key)
|
|
key = variationselector.Remove(key)
|
|
- return sender.Client.SendMessage(context.TODO(), portal.Key.JID, id, &waProto.Message{
|
|
|
|
|
|
+ return sender.Client.SendMessage(context.TODO(), portal.Key.JID, &waProto.Message{
|
|
ReactionMessage: &waProto.ReactionMessage{
|
|
ReactionMessage: &waProto.ReactionMessage{
|
|
Key: &waProto.MessageKey{
|
|
Key: &waProto.MessageKey{
|
|
RemoteJid: proto.String(portal.Key.JID.String()),
|
|
RemoteJid: proto.String(portal.Key.JID.String()),
|
|
@@ -4111,7 +4111,7 @@ func (portal *Portal) sendReactionToWhatsApp(sender *User, id types.MessageID, t
|
|
Text: proto.String(key),
|
|
Text: proto.String(key),
|
|
SenderTimestampMs: proto.Int64(timestamp),
|
|
SenderTimestampMs: proto.Int64(timestamp),
|
|
},
|
|
},
|
|
- })
|
|
|
|
|
|
+ }, whatsmeow.SendRequestExtra{ID: id})
|
|
}
|
|
}
|
|
|
|
|
|
func (portal *Portal) upsertReaction(txn dbutil.Transaction, intent *appservice.IntentAPI, targetJID types.MessageID, senderJID types.JID, mxid id.EventID, jid types.MessageID) {
|
|
func (portal *Portal) upsertReaction(txn dbutil.Transaction, intent *appservice.IntentAPI, targetJID types.MessageID, senderJID types.JID, mxid id.EventID, jid types.MessageID) {
|
|
@@ -4186,7 +4186,7 @@ func (portal *Portal) HandleMatrixRedaction(sender *User, evt *event.Event) {
|
|
key.Participant = proto.String(msg.Sender.ToNonAD().String())
|
|
key.Participant = proto.String(msg.Sender.ToNonAD().String())
|
|
}
|
|
}
|
|
portal.log.Debugfln("Sending redaction %s of %s/%s to WhatsApp", evt.ID, msg.MXID, msg.JID)
|
|
portal.log.Debugfln("Sending redaction %s of %s/%s to WhatsApp", evt.ID, msg.MXID, msg.JID)
|
|
- _, err := sender.Client.SendMessage(context.TODO(), portal.Key.JID, "", &waProto.Message{
|
|
|
|
|
|
+ _, err := sender.Client.SendMessage(context.TODO(), portal.Key.JID, &waProto.Message{
|
|
ProtocolMessage: &waProto.ProtocolMessage{
|
|
ProtocolMessage: &waProto.ProtocolMessage{
|
|
Type: waProto.ProtocolMessage_REVOKE.Enum(),
|
|
Type: waProto.ProtocolMessage_REVOKE.Enum(),
|
|
Key: key,
|
|
Key: key,
|