mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/portal: don't bridge remote edits by different users
This commit is contained in:
parent
7492e6e308
commit
a01edae1c3
1 changed files with 6 additions and 0 deletions
|
|
@ -2095,6 +2095,12 @@ func (portal *Portal) handleRemoteEdit(ctx context.Context, source *UserLogin, e
|
|||
intent := portal.GetIntentFor(ctx, evt.GetSender(), source, RemoteEventEdit)
|
||||
if intent == nil {
|
||||
return
|
||||
} else if intent.GetMXID() != existing[0].SenderMXID {
|
||||
log.Warn().
|
||||
Stringer("edit_sender_mxid", intent.GetMXID()).
|
||||
Stringer("original_sender_mxid", existing[0].SenderMXID).
|
||||
Msg("Not bridging edit: sender doesn't match original message sender")
|
||||
return
|
||||
}
|
||||
ts := getEventTS(evt)
|
||||
converted, err := evt.ConvertEdit(ctx, portal, intent, existing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue