From b7dc5bd9ea6caf40524229db0038ba5db25d5511 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 11 Jun 2017 15:23:55 +0100 Subject: [PATCH] always give the correct from JID in messaging --- src/plugins/messaging.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/messaging.rs b/src/plugins/messaging.rs index dd206516..c29adc34 100644 --- a/src/plugins/messaging.rs +++ b/src/plugins/messaging.rs @@ -82,7 +82,7 @@ impl MessagingPlugin { } 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() { let payload = match MessagePayload::try_from(payload) { Ok(payload) => payload,