This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
zhabogram/zhabogram.rb
annelin da2de42645 Release 1.2
[!] Using YAML serilaization instead of sqlite3. You may convert your SQLite db to YAML format using this:
    (echo "---"; sqlite3 users.db 'select jid,login from users'|sed "s/|/: \'/g;s/$/\'/g") > users.dat

[FIX] Fixed repllies
[UPD] Sending presence probe after disconnect received — maybe there are another XMPP resource? ☺
[UPD] When XMPP user goes online if Telegram session already established -- resync statuses with Telegram network to get all contacts online immediately
2019-06-11 16:24:44 +03:00

20 lines
561 B
Ruby

# Some very important libraries'
require 'yaml'
require 'logger'
require 'xmpp4r'
require 'xmpp4r/discovery'
require 'digest'
require 'base64'
require 'fileutils'
require 'tdlib-ruby'
require_relative 'inc/telegramclient'
require_relative 'inc/xmppregister'
require_relative 'inc/xmppgateway'
require_relative 'inc/xmppcomponent'
# configuration
Config = YAML.load_file(File.dirname(__FILE__) + '/config.yml')
TelegramClient.configure(Config['telegram']) # configure tdlib
Zhabogram = XMPPComponent.new(Config['xmpp']) # spawn zhabogram
Zhabogram.connect()