fix: make redactions permanent

This commit is contained in:
timokoesters 2020-06-01 20:58:49 +02:00
parent b519bc6962
commit 5a47c75427
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 28 additions and 7 deletions

View file

@ -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();
}