dbus: filter attachment characters here. not ideal...
This commit is contained in:
@@ -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())),
|
||||
|
||||
Reference in New Issue
Block a user