aboutsummaryrefslogtreecommitdiff
path: root/room.h
AgeCommit message (Collapse)Author
2016-08-31Room: Drop unused codeKitsune Ral
2016-08-23Fix compilation with Qt 5.2.1Kitsune Ral
2016-07-29Added roomMembername() overload for userId, in addition to User*Kitsune Ral
2016-05-02Actually connect User::nameChanged to Room; make a new Room::memberRenamed ↵Kitsune Ral
signal, which clients should use in the room context. Processing changes of user displaynames is tricky: we have to not only deal with the currently renamed user but also with its past and new namesakes which might change representation due to that renaming. So in the worst case a single User::nameChanged signal may lead to three Room::memberRenamed references (and 3 user displaynames updated in the UI, respectively). And the newly added users should be taken care of in a similar manner, of course.
2016-05-02Calculate room displayname according to CS spec, with a new signal fired on ↵Kitsune Ral
a displayname update. This changes the way displayname is supplied to a client application - instead of calculating immediately, displayname becomes a separate stored value that is refreshed with every change of the list of members, or the name, or the canonical alias. displaynameChanged signal is supplied to subscribe to these updates: in case of displaying a room in the roomlist a client should use this new signal instead of Room::namesChanged. The displaname calculation algorithm is described in section 11.2.2.5 of the CS spec: https://matrix.org/docs/spec/r0.0.1/client_server.html#calculating-the-display-name-for-a-room
2016-05-02Introduced Room::roomMemberName(User*) that follows CS spec section 11.2.2.3Kitsune Ral
2016-05-02Change the way room members are stored to the one recommended by the CS spec.Kitsune Ral
According to section 11.2.2.3 of the CS spec, clients SHOULD follow a certain algorithm of making a non-ambiguous display name of a user in the room context. This algorithm implies checking whether other room members have the same display name. This commit prepares for implementation of the algorithm: 1. Use a hash map instead of a list to store room members. The external Room::users() API is kept intact. 2. Convenience CRUD methods are implemented to deal with the hash map. 3. An additional slot for user renaming is introduced (because renaming affects the hash map). Binding of actual signals is left for the next commit. 4. nullptr is the recommended representation of a null pointer since C++11. Use that and mandate compiler support of that.
2016-05-02Store left room members as well.Kitsune Ral
In particular, this will be needed to render room names according to the CS spec.
2016-04-23Room: Q_INVOKABLEDavid A Roberts
2016-04-08Rename Room::messages to Room::messageEventsKitsune Ral
Originally by Felx Rohrbach (kde@fxrh.de)
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral