fix: make redactions permanent
This commit is contained in:
parent
b519bc6962
commit
5a47c75427
3 changed files with 28 additions and 7 deletions
|
@ -7,6 +7,7 @@ use ruma_events::{
|
|||
use ruma_federation_api::EventHash;
|
||||
use ruma_identifiers::{EventId, RoomId, UserId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
@ -62,6 +63,11 @@ impl PduEvent {
|
|||
}
|
||||
}
|
||||
|
||||
self.unsigned.insert(
|
||||
"redacted_because".to_owned(),
|
||||
json!({"content": {}, "type": "m.room.redaction"}),
|
||||
);
|
||||
|
||||
self.content = new_content.into();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue