Adds support for Telegram to Pidgin, Adium, Finch and other Libpurple based messengers.
Find a file
mjentsch 51bb79947c Improve writing to state file and clean up repository
Instead of using a timer, schedule writes on each new messages. This ensures that there are not too many writes on big updates and still works without a long-running timer.
2015-01-23 16:37:22 +01:00
imgs Better icons 2014-11-24 23:01:58 +03:00
lodepng Move lodepng into separate folder 2015-01-02 22:03:47 +01:00
telegram-adium Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
tgl@76824c29a6 Update used version of tgl 2015-01-15 21:49:36 +01:00
.gitignore small bugfixes 2014-11-17 16:27:01 +03:00
.gitmodules Updated to use subdirectory. Fixed buffer overflow in date format 2014-11-12 21:23:01 +03:00
CHANGELOG Sleeker README, move changelog to separate file 2015-01-22 01:21:31 +01:00
config.h.in Fixed -lrt check 2014-11-24 20:37:10 +03:00
configure Fixed -lrt check 2014-11-24 20:37:10 +03:00
configure.ac Fixed -lrt check 2014-11-24 20:37:10 +03:00
install-sh Updated to use subdirectory. Fixed buffer overflow in date format 2014-11-12 21:23:01 +03:00
m4_ax_check_openssl.m4 Updated to use subdirectory. Fixed buffer overflow in date format 2014-11-12 21:23:01 +03:00
m4_ax_check_zlib.m4 Updated to use subdirectory. Fixed buffer overflow in date format 2014-11-12 21:23:01 +03:00
Makefile.in Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
Makefile.tgl Fix submodule makefiles 2015-01-16 16:29:17 +01:00
Makefile.tl-parser Fix submodule makefiles 2015-01-16 16:29:17 +01:00
mime.types Updated to latest version of libtgl 2014-11-18 17:45:19 +03:00
msglog.c Remove unused functions and add some comments 2014-12-26 19:19:29 +01:00
msglog.h Remove unused functions and add some comments 2014-12-26 19:19:29 +01:00
README.md Sleeker README, move changelog to separate file 2015-01-22 01:21:31 +01:00
telegram-base.c Improve writing to state file and clean up repository 2015-01-23 16:37:22 +01:00
telegram-base.h Improve writing to state file and clean up repository 2015-01-23 16:37:22 +01:00
telegram-purple.c Improve writing to state file and clean up repository 2015-01-23 16:37:22 +01:00
telegram-purple.h Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
tg-server.pub Slightly working version 2014-11-11 20:21:14 +03:00
tgp-2prpl.c Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
tgp-2prpl.h Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
tgp-net.c Remove exponential timeouts to prevent segfaults 2015-01-09 11:56:03 +01:00
tgp-net.h Remove exponential timeouts to prevent segfaults 2015-01-09 11:56:03 +01:00
tgp-structs.c Improve writing to state file and clean up repository 2015-01-23 16:37:22 +01:00
tgp-structs.h Improve writing to state file and clean up repository 2015-01-23 16:37:22 +01:00
tgp-timers.c Fixed duplicate free. Escape received messages. Updated to latest tgl 2014-11-21 19:36:48 +03:00
tgp-timers.h Slightly working version 2014-11-11 20:21:14 +03:00
tgp-utils.c Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
tgp-utils.h Fix user info and clean up source code 2015-01-22 00:16:35 +01:00

Telegram-Purple

Telegram-purple is a Libpurple plugin that adds support for the Telegram messenger. Its still alpha and not ready for production use.

Build

Below, you will find instructions of how to build the libpurple protocol plugin. If you just want to use the plugin in Adium, download precompiled packages here.

1. Clone

This repository has submodules, so you need to clone recursively

    git clone --recursive https://github.com/majn/telegram-purple

2. Fetch all dependencies

Fedora
    sudo yum install gcc openssl-devel glib2-devel libpurple-devel
Debian
    sudo apt-get install libssl-dev libglib2.0-dev libpurple-dev
OpenSUSE
    sudo zypper install gcc glib glib-devel libpurple libpurple-devel zlib-devel openssl libopenssl-devel

3. Compile and install

    ./configure
    make
    sudo make install

Usage

First Login

The username is your current phone number, including your full country prefix. For Germany, this would be '+49', resulting in a user name like '+49151123456'. Telegram will verify your phone number by sending you a code via sms. You will be prompted for this code, once that happens.

Using secret chats

You can use Telegram secret chats with this plugin, they will show up as a new buddy with a '!' in front of the buddy name.

One caveat of secret chats in Telegram is that they can only have one endpoint, this is a limitation of the protocol. This means that if you create a secret chat in Pidgin you will not be able to use that chat on your phone. You will be asked whether to accept each secret chat, so you can always choose to accept the chat on a different device if you want. You can set a default behavior for dealing with secret chats (Accept or Decline) in the account settings if you don't want that prompt to appear every time.

Self destructive messages will be ignored, since I don't know any way to delete them from the conversation and the history.

Confirming the key authenticity

Click on the buddy in the buddy list and click on "Show Info" to visualize the key fingerprint.

Confirm key authenticity

Initiate secret chats

To initiate a secret chat from Pidgin, click on a Buddy in the Buddy List and hit ``Start Secret Chat''

Deleting secret chats

If you delete a secret chat from the buddy list, it will be terminated and no longer be usable.

Unicode Emojis for Pidgin

The Telegram phone applications for iOS and Android make use of standardized Unicode smileys (called Emojis). Pidgin does not display those smileys natively, but you can install a custom smiley theme like (https://github.com/stv0g/unicode-emoji) or (https://github.com/VxJasonxV/emoji-for-pidgin) and activate it under Settings > Themes > Smiley Theme.

Troubleshooting

If you encounter problems running this plugin and you have updated from an older version, deleting your old user-data might be helpful. WARNING: This will require you to enter a new authentication code and delete all your secret chat keys.

To clean all your user files run:

    make purge

Building the Adium Plugin

Compiling with XCode is a little bit problematic, since it requries you to compile Adium first and point the XCode project to the build output. My advice is to just use the prebuild bundle, but if you really want to do it, follow those steps.

  1. Compile the source of your current Adium version and add the created frameworks to the Adium-Telegram build path.
  2. Build the tgl submodule.
  3. Get zlib and libcrypto.a and provide it somewhere in your build path.
  4. Build the XCode-Project and execute the created bundle.

Authors

Telegram-Purple was written by:

- Matthias Jentsch <mtthsjntsch@gmail.com>
- Vitaly Valtman
- Christopher Althaus <althaus.christopher@gmail.com>
- Markus Endres <endresma45241@th-nuernberg.de>

Acknowledgements

This software is based on the library Libtgl, which was written by Vitaly Valtman mail@vysheng.ru and others, see (http://github.com/vysheng/tgl)

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)

This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)