summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2018-04-28 12:59:40 (GMT)
committerKevin Smith <git@kismith.co.uk>2018-04-28 12:59:40 (GMT)
commit4ea9c16b31b4936eaba4e7c2905672702d9d45bc (patch)
tree01d971fee0486c973a78ad64d19ea519cf099cfc /Swift
parent7f0bbb47ef2c8afb0cbe015438d8f2c4459ab7c0 (diff)
downloadswift-4ea9c16b31b4936eaba4e7c2905672702d9d45bc.zip
swift-4ea9c16b31b4936eaba4e7c2905672702d9d45bc.tar.bz2
Don't duplicate blue-roster entries on reconnect
Test-Information: Log in, go offline, go online. Before the patch this'd trigger duplicate entries (and now it doesn't). Change-Id: I651f8a0285e5e0748c263ab42f56aa86a3a2a3a1
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Chat/Chattables.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/Chattables.cpp b/Swift/Controllers/Chat/Chattables.cpp
index b75e18d..599ff48 100644
--- a/Swift/Controllers/Chat/Chattables.cpp
+++ b/Swift/Controllers/Chat/Chattables.cpp
@@ -18,6 +18,9 @@ const Chattables::State& Chattables::getState(const JID& jid) const {
}
void Chattables::addJID(const JID& jid, State::Type type) {
+ if (states_.find(jid) != states_.end()) {
+ return;
+ }
State state;
state.type = type;
state.jid = jid;