aboutsummaryrefslogtreecommitdiff
path: root/jobs/syncjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/syncjob.cpp')
-rw-r--r--jobs/syncjob.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/jobs/syncjob.cpp b/jobs/syncjob.cpp
index 78a9e93f..f679e6f4 100644
--- a/jobs/syncjob.cpp
+++ b/jobs/syncjob.cpp
@@ -92,15 +92,14 @@ SyncRoomData::SyncRoomData(const QString& roomId_, JoinState joinState_,
const QJsonObject& room_)
: roomId(roomId_)
, joinState(joinState_)
- , state("state")
+ , state(joinState == JoinState::Invite ? "invite_state" : "state")
, timeline("timeline")
, ephemeral("ephemeral")
, accountData("account_data")
- , inviteState("invite_state")
{
switch (joinState) {
case JoinState::Invite:
- inviteState.fromJson(room_);
+ state.fromJson(room_);
break;
case JoinState::Join:
state.fromJson(room_);