Commit graph

83 commits

Author SHA1 Message Date
mjentsch
9cd264dea6 Still display the message when the chat info cannot be fetched
User objects will be allocated once they send a message that needs to be displayed, until then the users will just not show up in the user list of the chat.
2016-01-24 15:17:54 +01:00
mjentsch
739f2b7e46 Improve error handling a little more 2016-01-24 15:17:54 +01:00
mjentsch
6a8760d5d3 Graceful error handling
Never kill process on issues, always log errors and write errors instead of failed messages.
2016-01-24 15:17:54 +01:00
mjentsch
edd86b60e2 Allow sending "cleartext" img tags in Adium
Adium does not use <img> tags for outgoing inline pictures in messages,
but initalizes a file transfer on its own. Additionally, they also don't
escape outgoing user-entered HTML, which means we must not search for outgoing HTML
<img> tags when using Adium, otherwise we would skip actual message
content.
2015-12-30 17:52:25 +01:00
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
a412ae2c19 Prevent frightening "directory could not be deleted" error
If an image is not found its filename will be NULL, which will cause build_filename to just return path of the tmp dir. When passing a directory to set_file_contents, it will attempt to unlink it (as the file already exists), but fail doing do, since unlink doesn't work on directories. This will still cause a scary warning message about "not being able to delete the tmp directory", which is now no longer printed.
2015-12-01 21:00:32 +01:00
mjentsch
2c21b59445 Fix memory leak 2015-12-01 20:55:14 +01:00
mjentsch
b3d09c1565 Fix redundant message when users are leaving chats
Do not display an extended reason when a user leaves on its own. Such a message makes only sense when a user is removed by somebody else.
2015-11-29 14:41:31 +01:00
mjentsch
5502824ac4 Clean up, refactoring and fix coding guidelines 2015-11-28 20:17:47 +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
Ben Wiederhake
77317fb99f Add plural support
Fixes #139.
2015-11-26 08:23:25 +01:00
Ben Wiederhake
954ed6048b Clarify messages, use 'please' where appropriate 2015-11-26 08:23:25 +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
553b10dee5 Fix compilation 2015-11-21 18:54:33 +01:00
mjentsch
602edc8b5f Cleanup and coding guidelines 2015-11-21 16:30:50 +01:00
mjentsch
c7a855a62c Do not rely on g_utf_8_substring length checking, it doesn't always do it 2015-11-21 16:23:46 +01:00
mjentsch
0b0dbfd25e Merge branch 'beta4' of https://github.com/EionRobb/telegram-purple into EionRobb-beta4 2015-11-21 01:14:06 +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
81b64d7542 Fix "crashes" on name changes
Do not assume that a name for each ID can only be set once anymore.
Remove assertion that names always exist, return 0 instead and propagate
error handling to the calling function.
2015-10-31 20:09:31 +01:00
Eion Robb
8562eb342c Allow compiling on Windows 2015-10-22 21:41:37 +13:00
Matthias Jentsch
b8e73f819c Fix compilation errors and warning when disbaling libwebp 2015-10-20 14:15:50 +02:00
mjentsch
306273d4c4 Merge branch 'beta4-human-reable-user-names' into beta4 2015-10-17 18:09:42 +02:00
mjentsch
df5a168a1f Remove unneeded and confusing messages 2015-10-17 00:26:00 +02:00
mjentsch
3f2f557284 Use clearer names for name and id resolution functions and clean up 2015-10-16 22:45:21 +02:00
mjentsch
a2fc31cda7 Fix service message formatting in Adium
Adium drops MESSAGE_SYSTEM flags in serv_got_im, directly write to the conversation in case the message contains such a flag.
2015-10-16 00:33:23 +02:00
mjentsch
afa650cfc1 Fix messages in secret chats not showing notifications in Adium
Secret chat messages are always unread, do not set MESSAGE_DELAYED.
2015-10-16 00:28:36 +02:00
mjentsch
76e6c2a4ad Never drop unread messages, even when they are older than the history threshold 2015-10-16 00:24:00 +02:00
Ben Wiederhake
029c1eece3 Rebasing mistake. Sorry. 2015-10-12 19:58:48 +02:00
Ben Wiederhake
c1888926df Dumb typos. Sorry. 2015-10-12 18:48:56 +02:00
Ben Wiederhake
65336849fb Beautify and fix strings (part 1/2). 2015-10-12 13:27:46 +02:00
mjentsch
365f7b1da1 Provide utility function for printing system messages in all chat types 2015-10-11 14:19:37 +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
f3acef6737 Fix a few unimportant memory leaks. 2015-10-07 22:07:56 +02:00
Ben Wiederhake
6e7e9ce862 Fix translations to be at least passable. 2015-10-07 22:07:56 +02:00
mjentsch
688f628890 Consolidate user messages 2015-10-06 19:23:07 +02:00
mjentsch
8009b8c0ac Translate strings in telegram-purple 2015-10-06 14:37:12 +02:00
mjentsch
08168c6339 Include translation functions and restructure includes 2015-10-06 14:28:13 +02:00
mjentsch
f0b0550cf8 Support message mentions
Display mentions like messages that contain the user nick in Pidgin.
2015-10-06 13:45:59 +02:00
mjentsch
ba8d9cf378 Fix compilation when not using libwebp 2015-10-05 13:01:17 +02:00
Ben Wiederhake
47bd4b2b33 Use new API, fix build system. 2015-10-04 17:51:49 +02:00
mjentsch
0c06c63dc8 Fix support for old glib versions 2015-09-08 22:28:24 +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
936c541361 Fix segfault when receiving msg_send_done callback without a message 2015-09-08 17:06:56 +02:00
mjentsch
a5cef7dcaa Add support for roomlists 2015-09-08 17:06:56 +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
592b31e8c8 Cleanup 2015-09-08 17:06:55 +02:00
mjentsch
973f236abc Fix OSM geo link formatting when using a different locale 2015-08-28 20:55:31 +02:00
mjentsch
b6136a6a9c Fix sending animated pictures by inline image 2015-08-28 00:03:33 +02:00