Make getUserLevel() public

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-18 13:13:19 +05:30
parent ddb7a16fb8
commit f7a6fbd901

View File

@ -42,10 +42,10 @@ export class PowerLevels {
if (this._membership !== "join") { if (this._membership !== "join") {
return Number.MIN_SAFE_INTEGER; return Number.MIN_SAFE_INTEGER;
} }
return this._getUserLevel(this._ownUserId); return this.getUserLevel(this._ownUserId);
} }
_getUserLevel(userId) { getUserLevel(userId) {
if (this._plEvent) { if (this._plEvent) {
let userLevel = this._plEvent.content?.users?.[userId]; let userLevel = this._plEvent.content?.users?.[userId];
if (typeof userLevel !== "number") { if (typeof userLevel !== "number") {