mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-12 19:56:48 +00:00
fix: Don't insert top-level redacts in v11+ rooms
This commit is contained in:
1 parent
1ffb1d637e
commit
20fe43d200
1 file changed
+9
-1
@@ -190,9 +190,17 @@ impl super::Service {
|
||||
}
|
||||
}
|
||||
}
|
||||
let redacts = match redacts {
|
||||
// If this isn't a real redaction event, there's no redacts field.
|
||||
| _ if event_type != TimelineEventType::RoomRedaction || state_key.is_some() => None,
|
||||
// If the redaction is itself in the event content, we don't set the top-level field.
|
||||
| Some(_) if room_version_rules.redaction.content_field_redacts => None,
|
||||
// Otherwise, we do if it's present
|
||||
| other => other,
|
||||
};
|
||||
|
||||
let pdu = PduEvent {
|
||||
event_id: ruma::event_id!("$thiswillbefilledinlater").into(),
|
||||
event_id: ruma::owned_event_id!("$thiswillbefilledinlater"),
|
||||
room_id: room_id.map(ToOwned::to_owned),
|
||||
sender: sender.to_owned(),
|
||||
origin: None,
|
||||
|
||||
Reference in new issue
Block a user