zhabogram/zhabogram.rb
annelin dc615f977c Release 1.0.
[NEW] implemented XEP-0030 (Service Discovery) — you can now see transport in service discovery
[NEW] implemented XEP-0077 (In-Band Registration) — now you can also start session from GUI Jabber client
[NEW] implemented XEP-0100 iq:jabber:gateway — you can now add Telegram contact from your GUI Jabber client
[NEW] implemented presence cache. now sending presences once a minute to prevent presence flooding
[FIX] fixed online presence after establishing telegram session and offline after disposing session
[FIX] won't use tdlib message database anymore, implemented our own messages cache
[FIX] show "chat created" message correctly
[FIX] fixed /info command
[FIX] fixed closing secret chats
[UPD] now you can start secret chat directly by sending /secret to contact
[UPD] /debug renamed to /info, now shows active sesions, removed memory profiling as it does not helps
[UPD] removed main loop (but still shutting down correctly) — use systemd etc. to restart transport correctly
2019-05-07 22:22:26 +03:00

20 lines
559 B
Ruby

# Some very important libraries'
require 'yaml'
require 'logger'
require 'xmpp4r'
require 'xmpp4r/discovery'
require 'digest'
require 'base64'
require 'sqlite3'
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()