Fix messages on self-initiated channels

This commit is contained in:
2020-05-21 11:06:07 +01:00
parent d77d04e9b1
commit efe97a33c4
3 changed files with 18 additions and 7 deletions

View File

@@ -79,6 +79,14 @@ impl Channel {
"org.freedesktop.Telepathy.Channel.TargetHandleType".to_string(),
var_u32(self.handle_type()),
);
out.insert(
"org.freedesktop.Telepathy.Channel.InitiatorHandle".to_string(),
var_u32(self.initiator_handle),
);
out.insert(
"org.freedesktop.Telepathy.Channel.InitiatorID".to_string(),
var_str(self.initiator_contact().unwrap().get_addr().to_string()),
);
out.insert(
"org.freedesktop.Telepathy.Channel.TargetHandle".to_string(),
var_u32(self.target_handle),

View File

@@ -390,10 +390,10 @@ impl Connection {
) {
// Ignore messages that are self-originated.
// FIXME: special-case self-chats
// if msg.get_from_id() == dc::constants::DC_CONTACT_ID_SELF {
// println!("from ourselves, skipping");
// continue;
// }
if msg.get_from_id() == dc::constants::DC_CONTACT_ID_SELF {
println!("from ourselves, skipping");
continue;
}
let parts = convert_msg(&msg);