--- a/src/com/beem/project/beem/BeemService.java Thu Jan 05 23:26:33 2012 +0100
+++ b/src/com/beem/project/beem/BeemService.java Sun Jan 08 12:08:22 2012 +0100
@@ -566,26 +566,28 @@
}
}
+ //Bookmark : Muc
if (mConnection.containsKey(accountName)) {
Connection xmppCo = mConnection.get(accountName).getAdaptee();
Collection<BookmarkedConference> list = null;
- try {
+ try {
BookmarkManager bm = BookmarkManager.getBookmarkManager(xmppCo);
list = bm.getBookmarkedConferences();
} catch (XMPPException e) {
Log.e(TAG, "BookmarkManager", e);
}
for (BookmarkedConference bookmarkedConference : list) {
- Log.e("TAG + BOOKMARK", bookmarkedConference.getName());
- // Create a MultiUserChat using a Connection for a room
- MultiUserChat muc2 = new MultiUserChat(xmppCo, bookmarkedConference.getJid());
+ if (bookmarkedConference.isAutoJoin()) {
+ MultiUserChat muc2 = new MultiUserChat(xmppCo, bookmarkedConference.getJid());
- DiscussionHistory history = new DiscussionHistory();
- history.setMaxStanzas(5);
- try {
- muc2.join(bookmarkedConference.getNickname(), bookmarkedConference.getPassword(), history, SmackConfiguration.getPacketReplyTimeout());
- } catch (XMPPException e) {
- Log.e(TAG, "MUC Join Problem", e);
+ DiscussionHistory history = new DiscussionHistory();
+ history.setMaxStanzas(5);
+ try {
+ muc2.join(bookmarkedConference.getNickname(), bookmarkedConference.getPassword(), history,
+ SmackConfiguration.getPacketReplyTimeout());
+ } catch (XMPPException e) {
+ Log.e(TAG, "MUC Join Problem", e);
+ }
}
}
}