aboutsummaryrefslogtreecommitdiffstats
path: root/luz/src/connection/read.rs
diff options
context:
space:
mode:
Diffstat (limited to 'luz/src/connection/read.rs')
-rw-r--r--luz/src/connection/read.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/luz/src/connection/read.rs b/luz/src/connection/read.rs
index 0590ce3..aadf476 100644
--- a/luz/src/connection/read.rs
+++ b/luz/src/connection/read.rs
@@ -179,9 +179,9 @@ async fn handle_stanza(
) {
match stanza {
Stanza::Message(stanza_message) => {
- if let Some(from) = stanza_message.from {
+ if let Some(mut from) = stanza_message.from {
// TODO: group chat messages
- let message = Message {
+ let mut message = Message {
id: stanza_message
.id
// TODO: proper id storage
@@ -209,6 +209,8 @@ async fn handle_stanza(
)))
.await;
}
+ message.from = message.from.as_bare();
+ from = from.as_bare();
let _ = update_sender
.send(UpdateMessage::Message { to: from, message })
.await;