Label magic number

This commit is contained in:
Eric Eastwood 2023-03-27 15:31:46 -05:00
parent 371916e68a
commit acba597e8b

View File

@ -16,6 +16,9 @@ limitations under the License.
export const EVENT_TYPE = "m.room.power_levels"; export const EVENT_TYPE = "m.room.power_levels";
// See https://spec.matrix.org/latest/client-server-api/#mroompower_levels
const STATE_DEFAULT_POWER_LEVEL = 50;
export class PowerLevels { export class PowerLevels {
constructor({powerLevelEvent, createEvent, ownUserId, membership}) { constructor({powerLevelEvent, createEvent, ownUserId, membership}) {
this._plEvent = powerLevelEvent; this._plEvent = powerLevelEvent;
@ -70,8 +73,7 @@ export class PowerLevels {
if (typeof level === "number") { if (typeof level === "number") {
return level; return level;
} else { } else {
// TODO: Why does this default to 50? return STATE_DEFAULT_POWER_LEVEL;
return 50;
} }
} }