aboutsummaryrefslogtreecommitdiff
path: root/lib/user.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-29 13:26:36 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-30 16:19:32 +0900
commita28892ca3b40a32556ee7615116c322f6b2a4ae5 (patch)
tree2e666bb9e997a77b0dee03a315181420f0a61048 /lib/user.h
parent01c5a35398a55dfc4a30e466aeb13419387555d3 (diff)
downloadlibquotient-a28892ca3b40a32556ee7615116c322f6b2a4ae5.tar.gz
libquotient-a28892ca3b40a32556ee7615116c322f6b2a4ae5.zip
Room::processStateEvent, User: take the previous membership state from oldStateEvent
memberJoinState() just happens to return the not-yet-updated state, making its use around state changes very sensitive to moving things around. The event's own prevContent is unsigned, therefore untrusted.
Diffstat (limited to 'lib/user.h')
-rw-r--r--lib/user.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/user.h b/lib/user.h
index 0023b44a..7c9ed55f 100644
--- a/lib/user.h
+++ b/lib/user.h
@@ -105,7 +105,11 @@ namespace QMatrixClient
QString avatarMediaId(const Room* room = nullptr) const;
QUrl avatarUrl(const Room* room = nullptr) const;
- void processEvent(const RoomMemberEvent& event, const Room* r);
+ /// This method is for internal use and should not be called
+ /// from client code
+ // FIXME: Move it away to private in lib 0.6
+ void processEvent(const RoomMemberEvent& event, const Room* r,
+ bool firstMention);
public slots:
/** Set a new name in the global user profile */