Added telegramBot to user info
This commit is contained in:
parent
f7d118de27
commit
4fafaf8ed5
2 changed files with 13 additions and 1 deletions
|
|
@ -106,6 +106,7 @@ const schemaUser = new SimpleSchema({
|
|||
'name.first': String,
|
||||
'name.last': String, */
|
||||
lang: { type: String, optional: true },
|
||||
telegramBot: { type: String, optional: true },
|
||||
telegramChatId: { type: SimpleSchema.Integer, optional: true },
|
||||
telegramUsername: { type: String, optional: true },
|
||||
telegramFirstName: { type: String, optional: true },
|
||||
|
|
|
|||
|
|
@ -164,8 +164,19 @@ Meteor.startup(() => {
|
|||
}
|
||||
});
|
||||
|
||||
Migrations.add({
|
||||
version: 12,
|
||||
up: function setTelegramUsersBotId() {
|
||||
Meteor.users.update({ telegramChatId: { $ne: null }, telegramBot: null }, {
|
||||
$set: {
|
||||
telegramBot: 'es'
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Set createdAt in users & subs
|
||||
Migrations.migrateTo('latest');
|
||||
|
||||
// Migrations.migrateTo('7,rerun');
|
||||
// Migrations.migrateTo('12,rerun');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue