always give the correct from JID in messaging

This commit is contained in:
Emmanuel Gil Peyrot 2017-06-11 15:23:55 +01:00
parent 3331ba8f62
commit b7dc5bd9ea

View file

@ -82,7 +82,7 @@ impl MessagingPlugin {
} }
fn handle_message(&self, message: &Message) -> Propagation { fn handle_message(&self, message: &Message) -> Propagation {
let from = message.from.clone().unwrap(); let from = message.from.clone().unwrap_or(self.proxy.get_own_jid());
for payload in message.payloads.clone() { for payload in message.payloads.clone() {
let payload = match MessagePayload::try_from(payload) { let payload = match MessagePayload::try_from(payload) {
Ok(payload) => payload, Ok(payload) => payload,