1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Give timelines a name

The debug of "joined timeline [Object] to timeline [Object]" isn't terribly
helpful, so let's at least give them an identifier.
This commit is contained in:
Richard van der Hoff
2016-04-14 16:11:48 +01:00
parent 950fce80c8
commit 90101c0340

View File

@@ -42,6 +42,8 @@ function EventTimeline(roomId) {
// this is used by client.js
this._paginationRequests = {'b': null, 'f': null};
this._name = roomId + ":" + new Date().toISOString();
}
/**
@@ -290,6 +292,15 @@ EventTimeline.prototype.removeEvent = function(eventId) {
return null;
};
/**
* Return a string to identify this timeline, for debugging
*
* @return {string} name for this timeline
*/
EventTimeline.prototype.toString = function() {
return this._name;
};
/**
* The EventTimeline class