mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 12:16:54 +00:00
fix: Don't unnecessarily embed prev_content in populate_unsigned
This commit is contained in:
2 files changed
+5
-7
No files matched your search
@@ -53,6 +53,11 @@ impl Pdu {
|
||||
|
||||
if let Some(prev_content) = prev_content {
|
||||
unsigned.insert("prev_content".to_owned(), to_raw_value(&prev_content)?);
|
||||
// TODO(nex): prev_sender is still inserted in append.rs because
|
||||
// only the prev *content* is passed to this function.
|
||||
// I think ideally passing the actual direct `UnsignedContext` to
|
||||
// this function instead of unpacking its parameters would be the
|
||||
// proper solution, especially since every callsite has one
|
||||
}
|
||||
if let Some(redacted_because) = redacted_because {
|
||||
unsigned.remove("org.continuwuity.redacted_by");
|
||||
|
||||
@@ -336,13 +336,6 @@ impl super::Service {
|
||||
else {
|
||||
return;
|
||||
};
|
||||
unsigned.insert(
|
||||
"prev_content".to_owned(),
|
||||
CanonicalJsonValue::Object(
|
||||
utils::to_canonical_object(prev_state.get_content_as_value())
|
||||
.expect("Failed to convert prev_content into canonical JSON object"),
|
||||
),
|
||||
);
|
||||
unsigned.insert(
|
||||
String::from("prev_sender"),
|
||||
CanonicalJsonValue::String(prev_state.sender().to_string()),
|
||||
|
||||
Reference in new issue
Block a user