Move from XEP-0048 to Bookmarks 2 (This Time it’s Serious).

This commit is contained in:
Emmanuel Gil Peyrot 2019-09-29 03:59:44 +02:00
commit a3e6ef8c3a
4 changed files with 133 additions and 47 deletions

View file

@ -54,9 +54,15 @@ fn main() {
Event::ContactChanged(contact) => {
println!("Contact {} changed.", contact.jid);
},
Event::OpenRoomBookmark(bookmark) => {
println!("Joining room “{}” ({})…", bookmark.name, bookmark.jid);
agent.join_room(bookmark.jid, bookmark.nick, bookmark.password, "en", "Yet another bot!");
Event::JoinRoom(jid, conference) => {
println!("Joining room {} ({:?})…", jid, conference.name);
agent.join_room(jid, conference.nick, conference.password, "en", "Yet another bot!");
},
Event::LeaveRoom(jid) => {
println!("Leaving room {}", jid);
},
Event::LeaveAllRooms => {
println!("Leaving all rooms…");
},
Event::RoomJoined(jid) => {
println!("Joined room {}.", jid);