Arseniy Lartsev
5b0bacda99
Completely finished adding contacts
2020-05-04 17:16:13 +02:00
Arseniy Lartsev
827410d7fd
Fixed all possible contact duplication
...
When adding a contact with phone number starting with +, telegram will
report phone number without + in subsequent communication. To avoid
problems, always remove leading + before using phone number as libpurple
buddy name.
2020-05-04 17:07:53 +02:00
Arseniy Lartsev
f813f4d8ba
Added comment about auto-removing contacts
2020-05-04 16:21:50 +02:00
Arseniy Lartsev
00cef86071
Revert "Prevent contact duplication in some theoretical situation"
...
This reverts commit d50c766562bb55f2fe11de8b13469bc865455851.
2020-05-04 16:20:47 +02:00
Arseniy Lartsev
d50c766562
Prevent contact duplication in some theoretical situation
...
In any case, make sure to equate phone numbers with and without leading
plus
2020-05-04 16:20:43 +02:00
Arseniy Lartsev
a2e5bba5ff
Correctly log getContacts response
2020-05-04 16:20:43 +02:00
Arseniy Lartsev
22e18cd8ec
Refactored adding/renaming libpurple buddies at login
...
Same function could now be called for post-login updates, though there
does not seem to be any need for that at the moment
2020-05-04 14:08:57 +02:00
Arseniy Lartsev
1b0f8f0e32
More correct handling of responses when creating private chats at login
...
For successful response, this didn't really matter except for log
message, because the new chat was getting added anyway. For a failed
response, there would be invalid pointer cast and all kinds of problems.
2020-05-04 13:37:02 +02:00
Arseniy Lartsev
3c835bb06f
Replaced all function-specific idle callbacks with straight calls
...
Everything outside of TdTransceiver is now single-threaded, so there is
no longer any need for these idle callbacks
2020-05-02 13:40:48 +02:00
Arseniy Lartsev
eccb0096c5
Removed account data mutex
...
Everything outside TdTransceiver is now single-threaded so the mutex is
no longer needed
2020-05-02 12:57:48 +02:00
Arseniy Lartsev
aa9bba1f93
Refactored handling of incoming responses and updates
...
Added RX queue, making it the only data structure needing mutex protection,
and moved it together with all thread-related code into separate class
2020-05-02 12:53:01 +02:00
Arseniy Lartsev
de9163a7ea
Create/request private chats for contacts without chat history
...
Upon login, tdlib will not inform of private chats for contacts without
chat history, thus private chats need to be "created" (with "return
existing if already exists" logic in tdlib) explicitly
2020-05-02 12:42:47 +02:00
Arseniy Lartsev
d7ba8d712b
Request information about all contacts from server after connecting
...
This way, user IDs for contacts with whom there is no chat history
(and thus which are not included in response to getChats) will be known
2020-03-25 16:49:26 +01:00
Arseniy Lartsev
4186b9fdcf
Finished adding contact - should be possible to message it right after
...
But not possible to message after restarting the messenger without
having message prior to restart
2020-03-24 00:14:19 +01:00
Arseniy Lartsev
9bf417ad2e
First steps of correct contact addition procedure
2020-03-23 22:56:16 +01:00
Arseniy Lartsev
29d57d05bb
Maybe implemented adding contacts
...
At least, handle failure when it fails
2020-03-21 14:34:45 +01:00
Arseniy Lartsev
3b0686a5bf
Maybe finished remote typing notifications in private chats
2020-03-21 14:34:34 +01:00
Arseniy Lartsev
1ae80cd8c2
Started implementing typing notifications from peers
...
Waiting until someone talks to me now
2020-03-15 21:50:16 +01:00
Arseniy Lartsev
02026dd630
Properly display outgoing messages
2020-03-08 23:46:12 +01:00
Arseniy Lartsev
2cacaeba62
Rename buddies in contact list at login if they've renamed
2020-03-08 23:46:12 +01:00
Arseniy Lartsev
a9faaa7e6c
Set local alias for the libpurple account to "firt-name last-name"
...
This is done only upon login for now
2020-03-08 23:46:10 +01:00
Arseniy Lartsev
c579baefec
More properly report connection state to libpurple
2020-02-29 15:30:24 +01:00
Arseniy Lartsev
82f389b9fe
Tried to implement user status updates
2020-02-27 22:27:56 +01:00
Arseniy Lartsev
9c73cb085b
Implemented sending messages to private chats
2020-02-27 21:53:56 +01:00
Arseniy Lartsev
04f429dd53
Ditched chats history requests
...
tdlib notifies about accumulated unread messages same as it
does about messages coming while online
2020-02-27 21:17:02 +01:00
Arseniy Lartsev
3145d76058
Let libpurple host log new unread messages now
2020-02-23 15:57:22 +01:00
Arseniy Lartsev
d03a558dba
At login, mark accumulated messages as read on the server
2020-02-23 15:47:18 +01:00
Arseniy Lartsev
1b8ced79d0
Moved everything protected by "data mutex" to a separate class
2020-02-23 14:02:47 +01:00
Arseniy Lartsev
964dc72173
Show accumulated messages in correct order
2020-02-23 00:33:10 +01:00
Arseniy Lartsev
47028f7114
Display offline messages, or those from another client, at login
2020-02-22 23:15:43 +01:00
Arseniy Lartsev
39a2be0122
Populate contact list and set status for the buddies
2020-02-22 19:03:14 +01:00
Arseniy Lartsev
7d574fd47c
Request information about contacts and channels after connecting
2020-02-22 15:53:07 +01:00
Arseniy Lartsev
7963c1fabe
Really finished basic login sequence
2020-02-22 15:04:06 +01:00
Arseniy Lartsev
e6fdde89ab
Finished basic login sequence
2020-02-22 14:58:32 +01:00
Arseniy Lartsev
2ad154f0de
Handle authentication errors
2020-02-22 13:31:10 +01:00
Arseniy Lartsev
2db6875707
Login sequence: send database encryption key and phone number
2020-02-22 12:08:02 +01:00
Arseniy Lartsev
16df148ab0
Login sequence: send TDLib parameters
2020-02-22 11:47:42 +01:00
Arseniy Lartsev
29e8628aba
Started implementing proper login sequence with background thread
2020-02-22 11:47:39 +01:00
Arseniy Lartsev
b0095d04c8
Moved tdlib log level setting from client constructor to plugin init
2020-02-17 23:30:24 +01:00
Arseniy Lartsev
531e27d503
Enable tdlib log with level based on libpurple log level
2020-02-16 23:22:36 +01:00
Arseniy Lartsev
87d5e0f60e
Added some debug logs through libpurple
2020-02-16 23:22:34 +01:00
Arseniy Lartsev
4a1be64135
Added rudimentary Telegram client class for purple plugin
2020-02-16 23:22:23 +01:00