pass event in the Room.tags event
This commit is contained in:
+4
-3
@@ -473,7 +473,7 @@ Room.prototype.addTags = function(event) {
|
||||
|
||||
// XXX: we could do a deep-comparison to see if the tags have really
|
||||
// changed - but do we want to bother?
|
||||
this.emit("Room.tags", this);
|
||||
this.emit("Room.tags", event, this);
|
||||
};
|
||||
|
||||
function setEventMetadata(event, stateContext, toStartOfTimeline) {
|
||||
@@ -618,10 +618,11 @@ module.exports = Room;
|
||||
/**
|
||||
* Fires whenever a room's tags are updated.
|
||||
* @event module:client~MatrixClient#"Room.tags"
|
||||
* @param {event} event The tags event
|
||||
* @param {Room} room The room whose Room.tags was updated.
|
||||
* @example
|
||||
* matrixClient.on("Room.tags", function(room){
|
||||
* var newTags = room.tags;
|
||||
* matrixClient.on("Room.tags", function(event, room){
|
||||
* var newTags = event.getContent().tags;
|
||||
* if (newTags["favourite"]) showStar(room);
|
||||
* });
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user