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

Add docs to appease jslint

This commit is contained in:
David Baker
2016-02-19 15:35:36 +00:00
parent 39f641a851
commit 2950417f70

View File

@@ -940,6 +940,11 @@ Room.prototype.addReceipt = function(event, fake) {
this.emit("Room.receipt", event, this); this.emit("Room.receipt", event, this);
}; };
/**
* Add a receipt event to the room.
* @param {MatrixEvent} event The m.receipt event.
* @param {Object} receipts The object to add receipts to
*/
Room.prototype._addReceiptsToStructure = function(event, receipts) { Room.prototype._addReceiptsToStructure = function(event, receipts) {
var self = this; var self = this;
utils.keys(event.getContent()).forEach(function(eventId) { utils.keys(event.getContent()).forEach(function(eventId) {
@@ -977,6 +982,11 @@ Room.prototype._addReceiptsToStructure = function(event, receipts) {
}); });
}; };
/**
* Build and return a map of receipts by event ID
* @param {Object} receipts A map of receipts
* @return {Object} Map of receipts by event ID
*/
Room.prototype._buildReciptCache = function(receipts) { Room.prototype._buildReciptCache = function(receipts) {
var receiptCacheByEventId = {}; var receiptCacheByEventId = {};
utils.keys(receipts).forEach(function(receiptType) { utils.keys(receipts).forEach(function(receiptType) {