diff options
author | Tobias Markmann <tm@ayena.de> | 2016-11-22 07:51:50 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-11-30 10:29:11 (GMT) |
commit | c65a90e2a73814d09ad8c60adc4a259e90006db7 (patch) | |
tree | c6b0f90fba9aa2c64e94e35e99c9b30557d5e4ad /Swift/Controllers/UnitTest | |
parent | 2039930eadd4756068a8a60c8340d9908a7136d3 (diff) | |
download | swift-c65a90e2a73814d09ad8c60adc4a259e90006db7.zip swift-c65a90e2a73814d09ad8c60adc4a259e90006db7.tar.bz2 |
Show MUC PM item-not-found error in MUC PM window
Previously, if one would send a MUC PM to a user that has
left a room the error response from the MUC would be shown
in the MUC room.
Now the error will show in the MUC PM window, if the MUC PM
full JID has a ChatController.
Test-Information:
Added unit test verifying new behaviour. Manually verified that
the error is shown in the MUC PM window instead of the MUC room
window.
Change-Id: I1b259d5eee9e22217bbe7e5c09294d2166a77895
Diffstat (limited to 'Swift/Controllers/UnitTest')
-rw-r--r-- | Swift/Controllers/UnitTest/MockChatWindow.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h index 9b943f0..76e5194 100644 --- a/Swift/Controllers/UnitTest/MockChatWindow.h +++ b/Swift/Controllers/UnitTest/MockChatWindow.h @@ -69,7 +69,11 @@ namespace Swift { virtual void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels) {labels_ = labels;} virtual void setSecurityLabelsEnabled(bool enabled) {labelsEnabled_ = enabled;} virtual void setUnreadMessageCount(int /*count*/) {} - virtual void convertToMUC(MUCType /*mucType*/) {} + + virtual void convertToMUC(MUCType mucType) { + mucType_ = mucType; + } + virtual void setSecurityLabelsError() {} virtual SecurityLabelsCatalog::Item getSelectedSecurityLabel() {return label_;} virtual void setOnline(bool /*online*/) {} @@ -144,6 +148,7 @@ namespace Swift { SecurityLabelsCatalog::Item label_; Roster* roster_ = nullptr; std::vector<std::pair<std::string, ReceiptState>> receiptChanges_; + boost::optional<MUCType> mucType_; }; } |