Commit graph

36 commits

Author SHA1 Message Date
mjentsch
8fed82cc75 Fix writing messages to deleted buddies and cleanup
Do not depend on buddy list entries when looking up the ID from the user name, by maintaining a bi-directional mapping ID <-> username. Rename functions to make them more evident as something that operatos on the lookup. Cleanup blist functions by implementating generic iterator function over account buddies.
2015-12-28 17:44:49 +01:00
mjentsch
91a4c3b845 Fix use after free 2015-12-18 23:03:31 +01:00
mjentsch
b85fc85322 Fix auto-joining chats 2015-12-18 22:59:51 +01:00
mjentsch
5428b39547 Fix messages not being marked as read despite sending responses or typing 2015-11-28 02:33:50 +01:00
mjentsch
601440004a Fix read recipes only sent on next incoming message / read recipe 2015-11-28 02:14:31 +01:00
mjentsch
04bc03bebf Clean up the include mess
Keep all libtgl and telegram-purple includes in telegram-purple.h to prevent duplication of all those includes. Remove redundant includes.
2015-11-23 03:06:30 +01:00
mjentsch
2d90f3ea03 More cleanup and refactoring 2015-11-21 22:14:57 +01:00
mjentsch
602edc8b5f Cleanup and coding guidelines 2015-11-21 16:30:50 +01:00
mjentsch
13fb3a74c6 Fix segfault on closing down
TLS now frees itself when calling tgl_free_all, adapt to this change.
2015-11-12 21:14:12 +01:00
mjentsch
23b357fac3 Fix read recipes not being sent when users leave or join chats 2015-11-01 19:11:22 +01:00
mjentsch
d43f4f0d64 Use better names 2015-10-17 23:11:15 +02:00
mjentsch
a3a35eb7ff Do not drop history or break conversations when buddy print name changes
Do not update blist buddy names, but set an alias instead to prevent breaking conversations or loosing history. Instead, keep the first print name as permanent user name
and set the alias on all buddy name changes. When interacting with purple always use the original buddy name stored in the blist instead of the print name provided by libpurple.
This allows both, meaningful names in group chats and permanent identifiers in the buddy list, while still propagating names changes to the interface.
2015-10-16 00:08:24 +02:00
mjentsch
4eeb7f73c9 Overhaul username handling
Use print names instead of ids as usernames, to fix problems with "useless" user ids showing up for unknown users and in group chats. Remove workarounds like "Telegram Foreign" needed to temporarily store user names for alias resolution.
2015-10-11 14:17:24 +02:00
Ben Wiederhake
47bd4b2b33 Use new API, fix build system. 2015-10-04 17:51:49 +02:00
mjentsch
5064acaaf9 Cleanup an coding guidelines 2015-10-03 02:12:58 +02:00
mjentsch
a43aa8de42 Prevent flood warnings #2
Only get every chat info exactly once to avoid stalling of the incoming message queue through flood warnings.
2015-09-08 22:13:37 +02:00
mjentsch
888cffffc1 Improve group chat management
Load full chat info lazily, prevents useless network request and should fix issues with delays through flood errors when handling big amounts of user chats. Handle chat participant deletions and additions correctly and only touch the user list when it is actually updated, this should fix some issues with printing annoying messages in Finch and users not showing up in the buddy list in certain situations. Only add chats to buddy list that are actively joined or receive incoming message, which should help keeping the buddy list more tidy when using much chats.
2015-09-08 17:06:56 +02:00
mjentsch
dc5bc8d039 Improve error handling 2015-08-01 23:34:00 +02:00
mjentsch
e8ceb21e64 Revise media message handling
This should fix many seg faults and make media handling more consistent.
2015-07-30 11:45:50 +02:00
mjentsch
1c7eebbe7c Ensure that messages are not sent during events.
Don't cause segfault in libtgl when add_log_event is called twice.
2015-04-03 01:23:09 +02:00
mjentsch
b67c4115ff Repository cleanup and housekeeping 2015-03-12 01:56:16 +01:00
mjentsch
1e442ac195 Ensure that the message sequence doesn't get mixed up
Process incoming messages in a queue. Move all message-related functionality into one file.
2015-03-12 01:38:17 +01:00
mjentsch
cd8085ce5a Use purple configuration directory for storing telegram state files 2015-03-09 16:03:10 +01:00
mjentsch
9cddd63f96 Clean up repository 2015-03-04 23:17:23 +01:00
mjentsch
deaa659895 Fix segfault in file transfer memory management 2015-03-04 22:37:59 +01:00
mjentsch
64e0a7f35f Fix plugin for Centos 6 by removing functions unsupported in old glib versions 2015-02-23 20:34:24 +01:00
mjentsch
c9aab9c8eb Support file transfers 2015-02-23 20:34:24 +01:00
mjentsch
c85b8da619 Do not add group chats in which the user is not a member
Clean up and refactor group chat code, move chat functions into separate file, always load all chat infos on plugin load so we know the members.
2015-01-28 18:41:41 +01:00
mjentsch
adc429beb4 Fix coding style and remove old commented-out code 2015-01-23 20:56:50 +01:00
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
mjentsch
1dd7be0262 Fix segfault by canceling pending login timer on close 2015-01-22 21:28:13 +01:00
mjentsch
ac9ce29b1d Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
mjentsch
7ef1648180 Remove more functions unsupported in old glib versions 2015-01-20 00:23:32 +01:00
mjentsch
6ba649fdba Remove functions unsupported in old glib versions 2015-01-19 23:47:46 +01:00
mjentsch
00ece8a3b4 Fix huge memory leak
Implement proper handling of imgstore reference counting and remove
several leaky memdup functions
2014-12-27 23:40:25 +01:00
mjentsch
d08e54d3e0 Move functions and defintions for plugin-internal structs into separate file and fix memory leak 2014-12-26 18:54:12 +01:00