aboutsummaryrefslogtreecommitdiff
path: root/events/roommemberevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'events/roommemberevent.h')
-rw-r--r--events/roommemberevent.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/events/roommemberevent.h b/events/roommemberevent.h
index d0c63f15..224f29c2 100644
--- a/events/roommemberevent.h
+++ b/events/roommemberevent.h
@@ -53,16 +53,17 @@ namespace QMatrixClient
explicit RoomMemberEvent(const QJsonObject& obj)
: StateEvent(Type::RoomMember, obj)
- , _userId(obj["state_key"].toString())
+// , _userId(obj["state_key"].toString())
{ }
MembershipType membership() const { return content().membership; }
- QString userId() const { return _userId; }
+ QString userId() const
+ { return originalJsonObject().value("state_key").toString(); }
QString displayName() const { return content().displayName; }
QUrl avatarUrl() const { return content().avatarUrl; }
private:
- QString _userId;
+// QString _userId;
REGISTER_ENUM(MembershipType)
};
} // namespace QMatrixClient