mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
Remove option to disable edit bridging
This commit is contained in:
parent
67f27c9baf
commit
139b89cd66
4 changed files with 1 additions and 6 deletions
|
@ -117,7 +117,6 @@ type BridgeConfig struct {
|
|||
URLPreviews bool `yaml:"url_previews"`
|
||||
CaptionInMessage bool `yaml:"caption_in_message"`
|
||||
ExtEvPolls bool `yaml:"extev_polls"`
|
||||
SendWhatsAppEdits bool `yaml:"send_whatsapp_edits"`
|
||||
CrossRoomReplies bool `yaml:"cross_room_replies"`
|
||||
|
||||
MessageHandlingTimeout struct {
|
||||
|
|
|
@ -106,7 +106,6 @@ func DoUpgrade(helper *up.Helper) {
|
|||
} else {
|
||||
helper.Copy(up.Bool, "bridge", "extev_polls")
|
||||
}
|
||||
helper.Copy(up.Bool, "bridge", "send_whatsapp_edits")
|
||||
helper.Copy(up.Bool, "bridge", "cross_room_replies")
|
||||
helper.Copy(up.Str|up.Null, "bridge", "message_handling_timeout", "error_after")
|
||||
helper.Copy(up.Str|up.Null, "bridge", "message_handling_timeout", "deadline")
|
||||
|
|
|
@ -309,9 +309,6 @@ bridge:
|
|||
caption_in_message: false
|
||||
# Should polls be sent using MSC3381 event types?
|
||||
extev_polls: false
|
||||
# Should Matrix edits be bridged to WhatsApp edits?
|
||||
# Official WhatsApp clients don't render edits yet, but once they do, the bridge should work with them right away.
|
||||
send_whatsapp_edits: false
|
||||
# Should cross-chat replies from WhatsApp be bridged? Most servers and clients don't support this.
|
||||
cross_room_replies: false
|
||||
# Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
|
||||
|
|
|
@ -3801,7 +3801,7 @@ func (portal *Portal) convertMatrixMessage(ctx context.Context, sender *User, ev
|
|||
}
|
||||
extraMeta := &extraConvertMeta{}
|
||||
var editRootMsg *database.Message
|
||||
if editEventID := content.RelatesTo.GetReplaceID(); editEventID != "" && portal.bridge.Config.Bridge.SendWhatsAppEdits {
|
||||
if editEventID := content.RelatesTo.GetReplaceID(); editEventID != "" {
|
||||
editRootMsg = portal.bridge.DB.Message.GetByMXID(editEventID)
|
||||
if editErr := getEditError(editRootMsg, sender); editErr != nil {
|
||||
return nil, sender, extraMeta, editErr
|
||||
|
|
Loading…
Reference in a new issue