aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/roomstateview.h3
-rw-r--r--quotest/quotest.cpp8
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/roomstateview.h b/lib/roomstateview.h
index cab69ae3..29cce00e 100644
--- a/lib/roomstateview.h
+++ b/lib/roomstateview.h
@@ -11,7 +11,8 @@ namespace Quotient {
class Room;
-class RoomStateView : private QHash<StateEventKey, const StateEventBase*> {
+class QUOTIENT_API RoomStateView
+ : private QHash<StateEventKey, const StateEventBase*> {
Q_GADGET
public:
const QHash<StateEventKey, const StateEventBase*>& events() const
diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp
index 6bcd71cd..90a5a69b 100644
--- a/quotest/quotest.cpp
+++ b/quotest/quotest.cpp
@@ -588,6 +588,14 @@ TEST_IMPL(changeName)
if (!rme->newDisplayName()
|| *rme->newDisplayName() != newName)
FAIL_TEST();
+ // State events coming in the timeline are first
+ // processed to change the room state and then as
+ // timeline messages; aboutToAddNewMessages is triggered
+ // when the state is already updated, so check that
+ if (targetRoom->currentState().get<RoomMemberEvent>(
+ localUser->id())
+ != rme)
+ FAIL_TEST();
clog << "Member rename successful, renaming the account"
<< endl;
const auto newN = newName.mid(0, 5);