2017-02-15 02:35:22 +00:00
|
|
|
class TelegramSupport < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
|
|
|
|
# return if it's a new setup
|
|
|
|
return if !Setting.find_by(name: 'system_init_done')
|
|
|
|
|
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.channel_telegram',
|
|
|
|
note: 'Manage %s',
|
|
|
|
preferences: {
|
|
|
|
translations: ['Channel - Telegram']
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
Ticket::Article::Type.create_if_not_exists(
|
|
|
|
name: 'telegram personal-message',
|
|
|
|
communication: true,
|
2017-02-15 03:07:17 +00:00
|
|
|
updated_by_id: 1,
|
|
|
|
created_by_id: 1,
|
2017-02-15 02:35:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|