diff --git a/README.md b/README.md index 14edbf6..6100293 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Here's where we're at right now: - [x] Appear as online in Empathy - [x] Disconnect! - [ ] Set up an account manually -- [ ] Contacts handling +- [~] Contacts handling - [x] Text messages - [ ] Multimedia messages - [ ] Setup messages @@ -103,12 +103,15 @@ the binary into `/usr/lib/telepathy/telepathy-padfoot`. I should probably put this into the makefile. +### Running - +D-Bus activation is not enabled yet, since it gets in the way of disaster-driven +development. Just run the `telepathy-padfoot` binary as the same user that your +chat client will be running as. It registers to the DBUS **session bus**, and +will be picked up next time your chat client scans (which may need a restart). ### Autogenerated telepathy DBUS bindings - It makes use of the `dbus-codegen-rust` crate to convert the [telepathy interface specs](https://github.com/TelepathyIM/telepathy-spec) into the executable code in `src/telepathy`. This is checked in, but can be diff --git a/src/padfoot/channel.rs b/src/padfoot/channel.rs index a6aadec..d312917 100644 --- a/src/padfoot/channel.rs +++ b/src/padfoot/channel.rs @@ -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), diff --git a/src/padfoot/connection.rs b/src/padfoot/connection.rs index 0bbd02b..39986c7 100644 --- a/src/padfoot/connection.rs +++ b/src/padfoot/connection.rs @@ -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);