mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
move applyUserTrustLevel() to API.*
This commit is contained in:
+5
-5
@@ -797,7 +797,7 @@ CefSharp.BindObjectAsync(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var applyUserTrustLevel = function (ref) {
|
API.applyUserTrustLevel = function (ref) {
|
||||||
ref.$isModerator = ref.developerType &&
|
ref.$isModerator = ref.developerType &&
|
||||||
ref.developerType !== 'none';
|
ref.developerType !== 'none';
|
||||||
ref.$isTroll = false;
|
ref.$isTroll = false;
|
||||||
@@ -847,7 +847,7 @@ CefSharp.BindObjectAsync(
|
|||||||
if (ref.homeLocation !== ref.$homeLocation.tag) {
|
if (ref.homeLocation !== ref.$homeLocation.tag) {
|
||||||
ref.$homeLocation = this.parseLocation(ref.homeLocation);
|
ref.$homeLocation = this.parseLocation(ref.homeLocation);
|
||||||
}
|
}
|
||||||
applyUserTrustLevel(ref);
|
this.applyUserTrustLevel(ref);
|
||||||
} else {
|
} else {
|
||||||
ref = {
|
ref = {
|
||||||
id: '',
|
id: '',
|
||||||
@@ -884,7 +884,7 @@ CefSharp.BindObjectAsync(
|
|||||||
...json
|
...json
|
||||||
};
|
};
|
||||||
ref.$homeLocation = this.parseLocation(ref.homeLocation);
|
ref.$homeLocation = this.parseLocation(ref.homeLocation);
|
||||||
applyUserTrustLevel(ref);
|
this.applyUserTrustLevel(ref);
|
||||||
this.currentUser = ref;
|
this.currentUser = ref;
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn = true;
|
||||||
this.$emit('LOGIN', {
|
this.$emit('LOGIN', {
|
||||||
@@ -964,7 +964,7 @@ CefSharp.BindObjectAsync(
|
|||||||
...json
|
...json
|
||||||
};
|
};
|
||||||
ref.$location = this.parseLocation(ref.location);
|
ref.$location = this.parseLocation(ref.location);
|
||||||
applyUserTrustLevel(ref);
|
this.applyUserTrustLevel(ref);
|
||||||
this.cachedUsers.set(ref.id, ref);
|
this.cachedUsers.set(ref.id, ref);
|
||||||
} else {
|
} else {
|
||||||
var props = {};
|
var props = {};
|
||||||
@@ -978,7 +978,7 @@ CefSharp.BindObjectAsync(
|
|||||||
if (ref.location !== ref.$location.tag) {
|
if (ref.location !== ref.$location.tag) {
|
||||||
ref.$location = this.parseLocation(ref.location);
|
ref.$location = this.parseLocation(ref.location);
|
||||||
}
|
}
|
||||||
applyUserTrustLevel(ref);
|
this.applyUserTrustLevel(ref);
|
||||||
for (var prop in ref) {
|
for (var prop in ref) {
|
||||||
if (isObject(ref[prop]) === false) {
|
if (isObject(ref[prop]) === false) {
|
||||||
props[prop] = true;
|
props[prop] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user