Commit graph

164 commits

Author SHA1 Message Date
mjentsch
7d63485e0a Fail gracefully on error responses by server 2014-10-06 22:58:16 +02:00
mjentsch
2f7f2068de Improve event handling-system 2014-10-06 22:57:20 +02:00
mjentsch
4b7b1e0010 Fix includes and remove obsolete code 2014-10-05 12:25:23 +02:00
mjentsch
f16f32d8c4 Rename struct user to struct tgl_user to avoid namespace collisions with osx system headers 2014-10-04 20:36:54 +02:00
mjentsch
e3d6f02a67 Add form for phone registratrion 2014-10-03 17:34:10 +02:00
mjentsch
334101c406 Improve logging system 2014-10-03 14:23:15 +02:00
mjentsch
c870e967db Send bytes to correct connection on importAuth 2014-10-03 00:14:57 +02:00
mjentsch
598559105f Fix importAuthorization 2014-10-02 23:10:23 +02:00
mjentsch
30ebe78fca Avoid invalid cast warning 2014-10-02 17:32:37 +02:00
mjentsch
5c488f9c8d Support downloads from foreign DCs 2014-10-02 12:29:02 +02:00
Christopher Althaus
164620f65d Add show user icons in buddy list 2014-09-20 23:20:14 +02:00
mjentsch
bb87200d5f Fix a bug that caused old messages to not be loaded on startup
Do not overwrite state file with secret chat file, provide flag for complete sync from start in do_get_difference
2014-09-18 22:26:08 +02:00
mjentsch
4a062b764f Use a separate handles for each mtproto_connection 2014-09-17 22:51:46 +02:00
Matthias Jentsch
dcf9b4f427 Do not free tree elements manually, the tree already does that 2014-09-10 18:09:57 +02:00
mjentsch
956a034be1 Add group chats 2014-09-07 20:56:44 +02:00
mjentsch
f0447fa958 Free all pending timers and queries after erroring 2014-09-06 01:09:47 +02:00
mjentsch
ce96381ef9 write secret chat file into user-specific directory and fix config path creation 2014-09-06 01:04:57 +02:00
mjentsch
b90c9453da Free memory and close connections on disconnect 2014-09-01 21:57:35 +02:00
mjentsch
d94dc52df0 Remove remaining global variables 2014-09-01 21:43:22 +02:00
Christopher Althaus
fa9d45bd20 User State/Typing implemented
Send Messages activated
2014-08-23 16:23:37 +02:00
mjentsch
5a425be62f Remove unused code and build files 2014-08-23 12:57:38 +02:00
mjentsch
7ee334ec37 Fix user registration 2014-08-23 02:52:04 +02:00
mjentsch
32039628a6 Remove unneeded commented code 2014-08-23 02:44:57 +02:00
mjentsch
a4e5449d5a Move telegram callbacks and settings into configuration struct 2014-08-23 02:40:10 +02:00
mjentsch
8ff9734077 Handle the SWITCH_DC RPCError by changing the data center and creating a new mtproto_connection 2014-08-22 18:54:25 +02:00
mjentsch
1b1c5d132a Remove overlooked incrementation of queries_num 2014-08-22 17:45:40 +02:00
mjentsch
54091b26e3 Log all output of verbosity-level 1 to libpurple log 2014-08-22 17:39:05 +02:00
mjentsch
e4bb5bf5a6 Count pending queries using the elements in the query tree, instead of counting the incoming and outgoing messages
Since the server is able to send queries without any response, and is also able to send multiple responses to an arbitrary query, the current way to count pending queries is not accurate and will lead to errors. Instead, the amount of queries in the query tree will be determined to decide whether there are pending messages.
2014-08-22 17:21:46 +02:00
mjentsch
7720beab6e Remove global configuration flags 2014-08-22 17:13:25 +02:00
mjentsch
32799a9086 Move binlog globals into a structure 2014-08-22 17:05:29 +02:00
mjentsch
1170ae5710 Implement state machine for dc discovery and login. 2014-08-08 08:45:58 +02:00
mjentsch
9e5b4ca5ec Refactor - Intermediate Commit 3 2014-08-06 19:45:46 +02:00
mjentsch
8a2c043db4 Refactor - Intermediate Commit 2 2014-07-29 15:36:59 +02:00
mjentsch
ed7aa7de5b Refactor Intermediate State 1 2014-07-29 15:36:59 +02:00
mjentsch
7fad1403ec Fetch chats and refactor libtelegram api 2014-07-11 19:57:32 +02:00
mjentsch
f78adc8b96 Support sending messages 2014-07-11 02:19:05 +02:00
mjentsch
d712b7e17f Add possibillity to listen to created users, chats and groups with event handlers and add some ability to exchange output functions with own callbacks 2014-06-22 23:36:52 +02:00
mjentsch
a005c015cd Implement phone number registration
When the current phone number is not registered with the telegram network, ask for first and last name and proceed with the regular sms-code authentication scheme.
2014-06-15 19:58:49 +02:00
mjentsch
62090b3ca0 Implement login and authentication mechanism and fix the logging mechanism
Use purple debugging functions by formatting the string beforehand and then passing the readily formatted string, instead of doing it with va_list. Log into the telegram network using the provided SMS code and hash or request a new one, in case one of those isn't provided. Store and load the state using the file config/auth, to be able to restore previous logins.
2014-06-15 13:38:38 +02:00
vysheng
0ca3a4dc48 fixed login 2014-03-21 15:33:06 +04:00
vysheng
183c09877d Merge github.com:vysheng/tg 2014-03-21 01:03:42 +04:00
vysheng
aa68c2c6ae Fixed sentCode parse in 12 layer 2014-03-21 01:03:23 +04:00
vysheng
1722bbc3f2 added layer 12 support 2014-03-20 19:33:08 +04:00
René van Dorst
a76d633705 Added command create_group_chat <user> <chat topic>.
Currently it supports only 1 user on creation.
Use chat_add_user to add more users to the chat.
2014-02-25 21:13:14 +01:00
vysheng
b8d827ed59 Fixed 'call' method from jerbob92 2014-02-24 15:27:30 +04:00
Jeroen Bobbeldijk
046b0ce109 Fully working phone call support, might need some tweaks and checks 2014-02-24 07:59:20 +01:00
Vysheng
856fba7fae Fixed registration. Fixed possible SIGSEGV in create_print_name 2014-02-07 19:40:39 +04:00
Vysheng
8ca4a475e7 Added -W key to wait dialog list before processing input 2014-02-03 19:50:57 +04:00
Vysheng
f5ac0e50f4 Merge github.com:vysheng/tg 2014-01-24 19:06:02 +04:00
Vysheng
7de612f5f8 added delete/restore messages queries 2014-01-24 19:05:41 +04:00