Merge branch 'messaging-from' into 'master'

Always give the correct from JID in messaging

See merge request !24
This commit is contained in:
lumi 2017-06-11 14:31:48 +00:00
commit cdc968a70b

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,