summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-05-17 13:15:07 (GMT)
committerThanos Doukoudakis <thanos.doukoudakis@isode.com>2018-05-14 09:55:30 (GMT)
commitb7849f50877dffd2755445a986d856340eed59c2 (patch)
treea76adbbc613525bec214995c176e6f0e37d8b5a0 /Swiften
parent4663da31954d989f8535b94c4a78a0f4515542a4 (diff)
downloadswift-b7849f50877dffd2755445a986d856340eed59c2.zip
swift-b7849f50877dffd2755445a986d856340eed59c2.tar.bz2
Allow resending messages without 198 acks
This patch will allow to resend messages that have not been successfully delivered to the server. It requires that the server will have stream management enabled as described in XEP-198. Test-Information: Tested the changes on Windows and Linux. Modified the code to force messages to fail, and then tested the resend functionality. Added ChatControllerTest, with unit Tests for the resend case. The rest of unit test pass. Change-Id: Id095528247b25a47e34c5632b8469ebd4c97149b
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/DummyStanzaChannel.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Client/DummyStanzaChannel.h b/Swiften/Client/DummyStanzaChannel.h
index 4cc0f7e..1ba70ad 100644
--- a/Swiften/Client/DummyStanzaChannel.h
+++ b/Swiften/Client/DummyStanzaChannel.h
@@ -48,8 +48,12 @@ namespace Swift {
return available_;
}
+ virtual void setStreamManagementEnabled(bool enable) {
+ streamManagement_ = enable;
+ }
+
virtual bool getStreamManagementEnabled() const {
- return false;
+ return streamManagement_;
}
template<typename T> bool isRequestAtIndex(size_t index, const JID& jid, IQ::Type type) {
@@ -101,5 +105,6 @@ namespace Swift {
bool available_ = true;
bool uniqueIDs_ = false;
unsigned int idCounter_ = 0;
+ bool streamManagement_ = false;
};
}