Skip to content
Snippets Groups Projects
Unverified Commit 9ac6717a authored by Sébastien Blin's avatar Sébastien Blin
Browse files

jamiaccount: init convModule for disabled accounts

Change-Id: Iec90e9d91f933531a96d4e84e6a3ed242caf1422
parent b122e248
Branches
No related tags found
No related merge requests found
...@@ -1237,6 +1237,7 @@ JamiAccount::loadAccount(const std::string& archive_password_scheme, ...@@ -1237,6 +1237,7 @@ JamiAccount::loadAccount(const std::string& archive_password_scheme,
config_->username = info->accountId; config_->username = info->accountId;
JAMI_WARNING("[Account {:s}] loaded account identity", getAccountID()); JAMI_WARNING("[Account {:s}] loaded account identity", getAccountID());
if (not isEnabled()) { if (not isEnabled()) {
convModule(); // Init conv module
setRegistrationState(RegistrationState::UNREGISTERED); setRegistrationState(RegistrationState::UNREGISTERED);
} }
} else if (isEnabled()) { } else if (isEnabled()) {
......
...@@ -108,6 +108,7 @@ public: ...@@ -108,6 +108,7 @@ public:
private: private:
void testCreateConversation(); void testCreateConversation();
void testOfflineConvModule();
void testCreateConversationInvalidDisplayName(); void testCreateConversationInvalidDisplayName();
void testGetConversation(); void testGetConversation();
void testGetConversationsAfterRm(); void testGetConversationsAfterRm();
...@@ -162,6 +163,7 @@ private: ...@@ -162,6 +163,7 @@ private:
CPPUNIT_TEST_SUITE(ConversationTest); CPPUNIT_TEST_SUITE(ConversationTest);
CPPUNIT_TEST(testCreateConversation); CPPUNIT_TEST(testCreateConversation);
CPPUNIT_TEST(testOfflineConvModule);
CPPUNIT_TEST(testCreateConversationInvalidDisplayName); CPPUNIT_TEST(testCreateConversationInvalidDisplayName);
CPPUNIT_TEST(testGetConversation); CPPUNIT_TEST(testGetConversation);
CPPUNIT_TEST(testGetConversationsAfterRm); CPPUNIT_TEST(testGetConversationsAfterRm);
...@@ -547,6 +549,14 @@ ConversationTest::testCreateConversation() ...@@ -547,6 +549,14 @@ ConversationTest::testCreateConversation()
CPPUNIT_ASSERT(deviceCrtStr == deviceCert); CPPUNIT_ASSERT(deviceCrtStr == deviceCert);
} }
void
ConversationTest::testOfflineConvModule()
{
std::cout << "\nRunning test: " << __func__ << std::endl;
auto carlaAccount = Manager::instance().getAccount<JamiAccount>(carlaId);
CPPUNIT_ASSERT(carlaAccount->convModule() != nullptr);
}
void void
ConversationTest::testCreateConversationInvalidDisplayName() ConversationTest::testCreateConversationInvalidDisplayName()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment