mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
patched migration bugs
This commit is contained in:
@@ -339,6 +339,11 @@ User.virtual('banned')
|
||||
})
|
||||
.set(function(status) {
|
||||
this.status.banned.status = status;
|
||||
|
||||
if (!this.status.banned.history) {
|
||||
this.status.banned.history = [];
|
||||
}
|
||||
|
||||
this.status.banned.history.push({
|
||||
status,
|
||||
created_at: new Date(),
|
||||
@@ -357,6 +362,11 @@ User.virtual('suspended')
|
||||
})
|
||||
.set(function(until) {
|
||||
this.status.suspension.until = until;
|
||||
|
||||
if (!this.status.suspension.history) {
|
||||
this.status.suspension.history = [];
|
||||
}
|
||||
|
||||
this.status.suspension.history.push({
|
||||
until,
|
||||
created_at: new Date(),
|
||||
|
||||
Reference in New Issue
Block a user