![annelin](/assets/img/avatar_default.png)
! Backward compatibility with old sessions file (sessions.db) is broken due to planned config variables in future. New format is: :sessions jid@server :login: '1234567890' — Huge code refactoring and readability improvement — Removed XMPP features jabber:iq:register (will now try to log in after subscription request) and jabber:iq:gateway (since it does not working on foreign servers?) — Reworked application logic — now code in `xmppcomponent.rb` only used to XMPP jobs and `telegramclient.rb` aims Telegram. Because of that, commands like /login /code /password are moved out to `telegramclient.rb` and now are parts of internal command to gateway (chat id 0) — Reworked /chat and /gateway command list — please, just send /help to gateway or any active chat. — Improved stability (I hope so...) — Any other small (and not only) unlisted and forgotten changes..
17 lines
409 B
Ruby
17 lines
409 B
Ruby
require 'set'
|
|
require 'yaml'
|
|
require 'yaml/store'
|
|
require 'logger'
|
|
require 'xmpp4r'
|
|
require 'digest'
|
|
require 'base64'
|
|
require 'fileutils'
|
|
require 'tdlib-ruby'
|
|
require_relative 'inc/telegramclient'
|
|
require_relative 'inc/xmppcomponent'
|
|
|
|
Config = YAML.load_file(File.dirname(__FILE__) + '/config.yml')
|
|
TelegramClient.configure Config[:telegram]
|
|
Zhabogram = XMPPComponent.new Config[:xmpp]
|
|
Zhabogram.connect()
|