xmpp: Use ResourcePart for sender of room events

This commit is contained in:
xmppftw xmppftw 2024-12-18 00:59:47 +01:00 committed by xmpp ftw
commit 5477cf1240
4 changed files with 10 additions and 8 deletions

View file

@ -20,7 +20,7 @@ pub async fn handle_message_group_chat(
if let Some((_lang, subject)) = message.get_best_subject(langs.clone()) {
events.push(Event::RoomSubject(
from.to_bare(),
from.resource().map(|x| x.to_string()),
from.resource().map(Into::into),
subject.0.clone(),
time_info.clone(),
));
@ -31,7 +31,7 @@ pub async fn handle_message_group_chat(
Ok(full) => Event::RoomMessage(
message.id.clone(),
from.to_bare(),
full.resource().to_string(),
full.resource().into(),
body.clone(),
time_info,
),