summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-04-26 07:29:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-26 07:29:55 (GMT)
commit37567ebaa72cfc26e6cf49179eb988594c488c4b (patch)
treea38d5a4e919d768bf958c47e52bd313e90e441f0 /Swift/Controllers/Chat
parentbc64e2e7537d714b67697cced7215ff819b0a23e (diff)
downloadswift-contrib-37567ebaa72cfc26e6cf49179eb988594c488c4b.zip
swift-contrib-37567ebaa72cfc26e6cf49179eb988594c488c4b.tar.bz2
Don't attempt to login without a valid node@domain JID.
Invalid JIDs and JIDs without nodes will now be rejected. Resolves: #829 Release-Notes: Username well-formedness will now be checked before attempting to connect.
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.h b/Swift/Controllers/Chat/ChatsManager.h
index 3740186..34cd1bf 100644
--- a/Swift/Controllers/Chat/ChatsManager.h
+++ b/Swift/Controllers/Chat/ChatsManager.h
@@ -52,6 +52,12 @@ namespace Swift {
void setServerDiscoInfo(boost::shared_ptr<DiscoInfo> info);
void handleIncomingMessage(boost::shared_ptr<Message> message);
private:
+ class Chat {
+ public: Chat(const JID& jid, bool isMUC, const std::string& nick) : jid(jid), isMUC(isMUC), nick(nick) {}
+ JID jid;
+ bool isMUC;
+ std::string nick;
+ };
void handleChatRequest(const std::string& contact);
void handleJoinMUCRequest(const JID& muc, const boost::optional<std::string>& nick, bool autoJoin);
void handleSearchMUCRequest();
@@ -64,6 +70,9 @@ namespace Swift {
void handleUserLeftMUC(MUCController* mucController);
void handleBookmarksReady();
void setupBookmarks();
+ void loadRecents();
+ void saveRecents();
+ void handleChatMadeRecent();
ChatController* getChatControllerOrFindAnother(const JID &contact);
ChatController* createNewChatController(const JID &contact);
ChatController* getChatControllerOrCreate(const JID &contact);
@@ -92,5 +101,6 @@ namespace Swift {
EntityCapsProvider* entityCapsProvider_;
MUCManager* mucManager;
MUCSearchController* mucSearchController_;
+ std::vector<Chat> recentChats_;
};
}