forked from GitHub/dbot
fix replace user entry
This commit is contained in:
parent
97d9869f4d
commit
f1d30c9df2
@ -60,7 +60,8 @@ var users = function(dbot) {
|
|||||||
|
|
||||||
// Replace users entry with new primary user
|
// Replace users entry with new primary user
|
||||||
var usersIndex = knownUsers.users.indexOf(newAlias);
|
var usersIndex = knownUsers.users.indexOf(newAlias);
|
||||||
knownUsers.users[usersIndex] = newParent;
|
knownUsers.splice(usersIndex, 1);
|
||||||
|
knownUsers.users.push(newParent);
|
||||||
|
|
||||||
// Remove alias for new parent & add alias for new alias
|
// Remove alias for new parent & add alias for new alias
|
||||||
delete knownUsers.aliases[newParent];
|
delete knownUsers.aliases[newParent];
|
||||||
|
Loading…
Reference in New Issue
Block a user