mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add test for user merging
This commit is contained in:
1 parent
bdf02a5ea2
commit
d80385c947
3 files changed
+66
-4
No files matched your search
@@ -165,7 +165,7 @@ export default class User {
|
||||
this.isAdmin = this.isAdmin && otherUser.isAdmin; // More secure to use && rather ||
|
||||
this.isBanned = this.isBanned || otherUser.isBanned;
|
||||
this.isBanned = this.isWhitelisted || otherUser.isWhitelisted;
|
||||
this.banReason = this.banReason.length > otherUser.banReason.length ? this.banReason : otherUser.banReason;
|
||||
this.banReason = this.updatedAtMs > otherUser.updatedAtMs ? this.banReason : otherUser.banReason;
|
||||
this.updatedAtMs = Date.now();
|
||||
|
||||
// Merge instance stats
|
||||
|
||||
Reference in new issue
Block a user