conversationrepository: cache account config

GitLab: #952
Change-Id: I50264953b3d1575cc323caf5348747f8b8a35313
This commit is contained in:
Adrien Béraud
2024-07-04 14:06:49 -04:00
parent 2e49d649d7
commit e31ca92b36
4 changed files with 100 additions and 144 deletions

View File

@ -432,7 +432,7 @@ ConversationMembersEventTest::generateFakeInvite(std::shared_ptr<JamiAccount> ac
git_index_write(index.get());
git_strarray_dispose(&array);
ConversationRepository cr(account->weak(), convId);
ConversationRepository cr(account, convId);
Json::Value json;
json["action"] = "add";
@ -1189,7 +1189,7 @@ ConversationMembersEventTest::testMemberAddedNoCertificate()
Json::StreamWriterBuilder wbuilder;
wbuilder["commentStyle"] = "None";
wbuilder["indentation"] = "";
ConversationRepository cr(carlaAccount->weak(), convId);
ConversationRepository cr(carlaAccount, convId);
cr.commitMessage(Json::writeString(wbuilder, json), false);
// Start Carla, should merge and all messages should be there

View File

@ -72,7 +72,7 @@ addVote(std::shared_ptr<JamiAccount> account,
Json::StreamWriterBuilder wbuilder;
wbuilder["commentStyle"] = "None";
wbuilder["indentation"] = "";
ConversationRepository cr(account->weak(), convId);
ConversationRepository cr(account, convId);
cr.commitMessage(Json::writeString(wbuilder, json), false);
}
@ -104,7 +104,7 @@ simulateRemoval(std::shared_ptr<JamiAccount> account,
git_index_write(index.get());
git_strarray_dispose(&array);
ConversationRepository cr(account->weak(), convId);
ConversationRepository cr(account, convId);
Json::Value json;
json["action"] = "ban";
@ -182,7 +182,7 @@ void
commit(std::shared_ptr<JamiAccount> account, const std::string& convId, Json::Value& message)
{
ConversationRepository::DISABLE_RESET = true;
ConversationRepository cr(account->weak(), convId);
ConversationRepository cr(account, convId);
Json::StreamWriterBuilder wbuilder;
wbuilder["commentStyle"] = "None";