pull/21833/head
Bruno Windels 2018-09-19 12:00:29 +02:00
parent e951a22d31
commit 93d34e7b3d
1 changed files with 11 additions and 9 deletions

View File

@ -144,23 +144,25 @@ function createRoomTimelineAction(matrixClient, timelineEvent, room, toStartOfTi
/** /**
* @typedef RoomMembershipAction * @typedef RoomMembershipAction
* @type {Object} * @type {Object}
* @property {string} action 'MatrixActions.RoomMember.membership'. * @property {string} action 'MatrixActions.Room.myMembership'.
* @property {RoomMember} member the member whose membership was updated. * @property {Room} room to room for which the self-membership changed.
* @property {string} membership the new membership
* @property {string} oldMembership the previous membership, can be null.
*/ */
/** /**
* Create a MatrixActions.Room.myMembership action that represents * Create a MatrixActions.Room.myMembership action that represents
* a MatrixClient `RoomMember.membership` matrix event for the syncing user, * a MatrixClient `Room.myMembership` event for the syncing user,
* emitted when the member's membership is updated. * emitted when the syncing user's membership is updated for a room.
* *
* @param {MatrixClient} matrixClient the matrix client. * @param {MatrixClient} matrixClient the matrix client.
* @param {MatrixEvent} membershipEvent the m.room.member event. * @param {Room} room to room for which the self-membership changed.
* @param {RoomMember} member the member whose membership was updated. * @param {string} membership the new membership
* @param {string} oldMembership the member's previous membership. * @param {string} oldMembership the previous membership, can be null.
* @returns {RoomMembershipAction} an action of type `MatrixActions.RoomMember.membership`. * @returns {RoomMembershipAction} an action of type `MatrixActions.Room.myMembership`.
*/ */
function createSelfMembershipAction(matrixClient, room, membership, oldMembership) { function createSelfMembershipAction(matrixClient, room, membership, oldMembership) {
return { action: 'MatrixActions.Room.myMembership', room, membership, oldMembership}; return { action: 'MatrixActions.Room.myMembership', room, membership, oldMembership};
} }
/** /**