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

Merge pull request #963 from huan/patch-1

Use cameCase instead of underscore
This commit is contained in:
Travis Ralston
2019-06-24 11:09:36 -06:00
committed by GitHub

View File

@@ -797,20 +797,20 @@ Room.prototype.getAvatarUrl = function(baseUrl, width, height, resizeMethod,
* @return {array} The room's alias as an array of strings * @return {array} The room's alias as an array of strings
*/ */
Room.prototype.getAliases = function() { Room.prototype.getAliases = function() {
const alias_strings = []; const aliasStrings = [];
const alias_events = this.currentState.getStateEvents("m.room.aliases"); const aliasEvents = this.currentState.getStateEvents("m.room.aliases");
if (alias_events) { if (aliasEvents) {
for (let i = 0; i < alias_events.length; ++i) { for (let i = 0; i < aliasEvents.length; ++i) {
const alias_event = alias_events[i]; const aliasEvent = aliasEvents[i];
if (utils.isArray(alias_event.getContent().aliases)) { if (utils.isArray(aliasEvent.getContent().aliases)) {
Array.prototype.push.apply( Array.prototype.push.apply(
alias_strings, alias_event.getContent().aliases, aliasStrings, aliasEvent.getContent().aliases,
); );
} }
} }
} }
return alias_strings; return aliasStrings;
}; };
/** /**
@@ -1419,11 +1419,11 @@ Room.prototype.addLiveEvents = function(events, duplicateStrategy) {
/** /**
* Removes events from this room. * Removes events from this room.
* @param {String[]} event_ids A list of event_ids to remove. * @param {String[]} eventIds A list of eventIds to remove.
*/ */
Room.prototype.removeEvents = function(event_ids) { Room.prototype.removeEvents = function(eventIds) {
for (let i = 0; i < event_ids.length; ++i) { for (let i = 0; i < eventIds.length; ++i) {
this.removeEvent(event_ids[i]); this.removeEvent(eventIds[i]);
} }
}; };