conversation: check author in countInteractionsSince

This allow us to only count interactions since last message written
for multi-device.

Change-Id: I9c46eab672719dbdc2e522bbf208f85adfb730f4
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
This commit is contained in:
Sébastien Blin
2021-08-16 15:01:48 -04:00
parent f7a5fe26f7
commit 15738fdf7b
14 changed files with 62 additions and 34 deletions

View File

@ -4670,9 +4670,11 @@ ConversationTest::testCountInteractions()
});
CPPUNIT_ASSERT(cv.wait_for(lk, std::chrono::seconds(30), [&] { return !msgId3.empty(); }));
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, "", "") == 4 /* 3 + initial */);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, msgId3, "") == 0);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, msgId2, "") == 1);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, "", "", "") == 4 /* 3 + initial */);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, "", "", aliceAccount->getUsername())
== 0);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, msgId3, "", "") == 0);
CPPUNIT_ASSERT(DRing::countInteractions(aliceId, convId, msgId2, "", "") == 1);
}
void