From b98dcbdecf60ebdd5df97c9af0323621ba70e9dd Mon Sep 17 00:00:00 2001 From: Joanna Hulboj Date: Mon, 8 May 2017 16:30:15 +0100 Subject: Fix for chat not being set correctly as impromptu chat Test-Information: Open Swift app, from Recent Chat List click on entry that was created from offline invitees. New chat window will be opened and the chat message will be e.g. "You have joined the chat as test.". Change-Id: I54bdd019aac4274bed2a213b2679e5aeca7bd5fb diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index d9f80ba..190ca8b 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -1063,8 +1063,9 @@ void ChatsManager::handleRecentActivated(const ChatListWindow::Chat& chat) { uiEventStream_->send(std::make_shared(inviteJIDs, chat.jid, "")); } else if (chat.isMUC) { + bool isImpromptu = (!chat.inviteesNames.empty() || !chat.impromptuJIDs.empty()); /* FIXME: This means that recents requiring passwords will just flat-out not work */ - uiEventStream_->send(std::make_shared(chat.jid, boost::optional(), chat.nick)); + uiEventStream_->send(std::make_shared(chat.jid, boost::optional(), chat.nick, false, false, isImpromptu)); } else { uiEventStream_->send(std::make_shared(chat.jid)); -- cgit v0.10.2-6-g49f6