xmpp: Add ChatMessage and GroupMessage events; API likely to change
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
597f5a3ccb
commit
f8cb643590
2 changed files with 39 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ async fn main() -> Result<(), Option<()>> {
|
|||
Event::ContactChanged(contact) => {
|
||||
println!("Contact {} changed.", contact.jid);
|
||||
}
|
||||
Event::ChatMessage(jid, body) => {
|
||||
println!("Message from {}: {}", jid, body.0);
|
||||
}
|
||||
Event::JoinRoom(jid, conference) => {
|
||||
println!("Joining room {} ({:?})…", jid, conference.name);
|
||||
client
|
||||
|
|
@ -78,6 +81,9 @@ async fn main() -> Result<(), Option<()>> {
|
|||
Event::RoomLeft(jid) => {
|
||||
println!("Left room {}.", jid);
|
||||
}
|
||||
Event::RoomMessage(jid, nick, body) => {
|
||||
println!("Message in room {} from {}: {}", jid, nick, body.0);
|
||||
}
|
||||
Event::AvatarRetrieved(jid, path) => {
|
||||
println!("Received avatar for {} in {}.", jid, path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue