mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
xmpp: add MucUser payload in send_room_private_message Messages
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
b8ba74e336
commit
d52ace59a9
1 changed files with 7 additions and 3 deletions
|
@ -259,12 +259,16 @@ impl Agent {
|
|||
&mut self,
|
||||
room: BareJid,
|
||||
recipient: RoomNick,
|
||||
type_: MessageType,
|
||||
lang: &str,
|
||||
text: &str,
|
||||
) {
|
||||
let recipient = room.with_resource(recipient);
|
||||
self.send_message(recipient.into(), type_, lang, text).await
|
||||
let recipient: Jid = room.with_resource(recipient).into();
|
||||
let mut message = Message::new(Some(recipient)).with_payload(MucUser::new());
|
||||
message.type_ = MessageType::Chat;
|
||||
message
|
||||
.bodies
|
||||
.insert(String::from(lang), Body(String::from(text)));
|
||||
let _ = self.client.send_stanza(message.into()).await;
|
||||
}
|
||||
|
||||
fn make_initial_presence(disco: &DiscoInfoResult, node: &str) -> Presence {
|
||||
|
|
Loading…
Reference in a new issue