Private
Public Access
1
0

dbus: filter attachment characters here. not ideal...

This commit is contained in:
2025-06-16 18:52:58 -07:00
parent 31eeb8659a
commit 45aaf55804

View File

@@ -127,7 +127,13 @@ impl DbusRepository for ServerImpl {
.map(|msg| {
let mut map = arg::PropMap::new();
map.insert("id".into(), arg::Variant(Box::new(msg.id)));
map.insert("text".into(), arg::Variant(Box::new(msg.text)));
// xxx: Remove the attachment placeholder here.
// This is not the ideal place to do this, but once we start using ChatItems instead of IMMessages
// from the server, we shouldn't be seeing these placeholders.
let text = msg.text.replace("\u{FFFC}", "");
map.insert("text".into(), arg::Variant(Box::new(text)));
map.insert(
"date".into(),
arg::Variant(Box::new(msg.date.and_utc().timestamp())),