Browse Source

Remove option to disable edit bridging

Tulir Asokan 2 years ago
parent
commit
139b89cd66
4 changed files with 1 additions and 6 deletions
  1. 0 1
      config/bridge.go
  2. 0 1
      config/upgrade.go
  3. 0 3
      example-config.yaml
  4. 1 1
      portal.go

+ 0 - 1
config/bridge.go

@@ -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 {

+ 0 - 1
config/upgrade.go

@@ -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")

+ 0 - 3
example-config.yaml

@@ -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

+ 1 - 1
portal.go

@@ -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