Compare commits

...

975 commits

Author SHA1 Message Date
mj
94dd3be54f Merge pull request #423 from TiagoDanin-Forks/README
README: Fix Markdown
2017-10-17 07:52:34 +02:00
Tiago Danin
0e0958753c README: Fix Markdown 2017-10-15 19:01:24 -03:00
mj
5876c98f8a Merge pull request #422 from unansweredocd/add-remove-session-in-faq
Add remove old session info to README
2017-10-15 21:23:31 +02:00
Sam Form
d286c1f338 use the more common purple directory 2017-10-15 20:52:24 +02:00
Sam Form
a54c4e7dd2 add info on how to clean the telegram-purple directory to deal with revoked sessions 2017-10-15 20:07:03 +02:00
Ben Wiederhake
7aa6874074 Update nsi file to reflect changes in po/LINGUAS 2017-04-10 22:54:08 +02:00
Ben Wiederhake
065e0b7ac9 Silence warnings about bad .po files
Sadly, Transifex doesn't seem to acknowledge that the generated files
are bad.  Also, I don't want to introduce any infrastructure to
fix the files every time after I download them.
So they stay broken, and the warnings must be silenced.
Sadly, this means that future warnings will get ignored, too.
Let's hope this won't go too bad.
2017-04-10 22:17:54 +02:00
mjentsch
6fd109bfca Increase version to 1.3.1 2017-04-09 13:48:52 +02:00
Ben Wiederhake
ada2c9aa1f AppStream: import translations from Transifex. Thanks to samant! 2017-03-13 23:36:27 +01:00
Ben Wiederhake
42c9ea8a3a AppStream: fix target order
Ahh, right, thankyou make, for reminding me that 'all' isn't actually
any automagically chosen target that is chosen when no target has been
specified.  No, instead, the first target is chosen.
And not just any target!  Only the first non-templated target is chosen,
so in this case: po/telegram-purple.metainfo.xml.pot .

However, in our case that's utterly pointless, so 'all' needs to
be on top again.  I should have known there was an important reason.
2017-03-13 23:35:59 +01:00
Ben Wiederhake
2ffa9e176a Import translations from Transifex. Thanks to eischmann, raven, savant! 2017-03-13 23:30:39 +01:00
mjentsch
77d50c3ae1 Merge branch 'EionRobb-group-typing-notifications' into dev-1.4.0
Merges pull request #359
2017-03-13 22:32:15 +01:00
mjentsch
ea0efaeab7 Merge branch 'dev-1.4.0' of https://github.com/majn/telegram-purple into dev-1.4.0 2017-03-13 22:28:38 +01:00
mjentsch
942e7c6244 Include autoloading for all types of documents and improve document captions 2017-03-13 22:28:10 +01:00
mjentsch
72151e7cbd Increase default file size download threshold
Far too many files are bigger than 8mb, we need a more pleasant default behavior
2017-03-13 21:56:49 +01:00
Eion Robb
0446ca2b9b Support typing notifications using the group-typing-notifications plugin
See https://github.com/EionRobb/pidgin-groupchat-typing-notifications
2017-03-13 22:27:01 +13:00
Ben Wiederhake
653eb902ce Import tgl updates 2017-03-06 22:01:07 +01:00
mjentsch
ab5b444e26 code style 2017-03-06 20:13:45 +01:00
mjentsch
014145c8ee Include libtgl crash and c++ compilation fixes 2017-03-02 20:34:02 +01:00
mjentsch
1cb22c9df1 Fix debug message 2017-03-02 20:24:33 +01:00
mjentsch
5a59dc100c Include pull request #302 by EionRobb 2017-03-02 20:23:17 +01:00
Ben Wiederhake
1842756995 Import plugin translations from Transifex. Thanks to all translators!
Also removed outdated HOWTO.md; and deprecated pt_BR,
as it fell below the 75% mark.
2017-02-27 11:47:10 +01:00
Ben Wiederhake
ea697f1cc7 Import AppStream translations from Transifex. Thanks to all translators! 2017-02-27 10:57:41 +01:00
Samuel Vandamme
20c78ce94c Added missing dependencies for Debian/Ubuntu 2017-02-24 22:30:37 +01:00
mjentsch
c0210af0b9 Fix crash on joining non-existing chat 2017-02-11 12:51:33 +01:00
mjentsch
aa3e220738 Increase version of OSX SDK for Adium bundle 2017-02-11 12:51:33 +01:00
mjentsch
4980fa460c Fix crash on duplicated peer name in peer tree 2017-02-11 12:51:33 +01:00
Ben Wiederhake
d8a040b5d5 tgl patch for OpenSSL variant 2017-01-22 22:09:04 +01:00
Ben Wiederhake
c5929af862 Merge branch 'master' into dev-1.4.0 2017-01-22 22:07:52 +01:00
mj
766335c34d Update README.md 2017-01-16 12:18:34 +01:00
mj
2ca2c46807 Merge pull request #342 from redsn0w0/patch-1
Update README.md
2017-01-16 10:54:59 +01:00
redsn0w
6234a65228 Update README.md
Fixed the telegram group invite link.
2017-01-14 12:15:44 +01:00
Ben Wiederhake
f45ed4572a Print some info when running into 'Sending message failed' errors
Related to #339
2017-01-09 18:22:17 +01:00
Ben Wiederhake
5de79c45a6 Merge branch 'master' into dev-1.4.0 2017-01-09 17:42:44 +01:00
mj
c52854ae51 Fix group chat link 2017-01-02 15:15:30 +01:00
mj
1dc5e2ba46 Merge pull request #334 from stefan2904/patch-1
updated readme to telegram-adium-1.3.0
2016-12-13 08:05:24 +01:00
Stefan
345006633c updated readme to telegram-adium-1.3.0 2016-12-13 00:31:12 +01:00
Ben Wiederhake
bb215b59d3 Import translations form Transifex. Thanks to all translators!
I'm aware that the new PO files are fishy and throw a lot of warnings.
I've created a ticket with Transifex, as their new PO-generation routine
seems to be bug-ridden.

However, until they fix it, we have to use the ugly value for msgid "".
2016-11-28 01:09:43 +01:00
Ben Wiederhake
59ec18fe1b Merge branch 'dev-1.3.0' into dev-1.4.0 2016-11-27 23:53:54 +01:00
mjentsch
7744facaec Merge branch 'chat-kick-c' of https://github.com/EionRobb/telegram-purple into dev-1.4.0 2016-11-13 19:26:55 +01:00
Eion Robb
71276b109e Add support for a /kick command in chat rooms 2016-11-13 09:22:28 +13:00
mj
cd451723ef Update README.md
Update chat link
2016-10-29 19:09:01 +02:00
Ben Wiederhake
a904aa37da Enable stack smashing protection (#315)
Check "by example" whether `-fstack-protector-strong` is supported.
2016-10-13 16:02:37 +02:00
Alain
ab7dcb8ee6 Changed check if -fstack-protector-strong is supported 2016-10-13 15:41:22 +02:00
Alain
0d0a2cbbd7 Check if gcc >= 5.0 before enabling stack smashing protection 2016-10-13 13:48:06 +02:00
Alain
9d86bf2af6 Enhance security using stack protector and -D_FORTIFY_SOURCE 2016-10-13 12:38:07 +02:00
Ben Wiederhake
23864bf541 Only load photos for non-deleted users 2016-10-11 00:13:09 +02:00
Ben Wiederhake
5fea0dae38 Merge Pull Request #304 from EionRobb/patch-4 2016-09-04 21:54:16 +02:00
Ben Wiederhake
82a5cbbf5a Merge Pull Request #303 from EionRobb/patch-3 2016-09-04 21:53:56 +02:00
Ben Wiederhake
6f89e259df Update tgl (32-bit BN2ull) 2016-09-04 21:52:41 +02:00
Eion Robb
f4b47623cf Compile tgp-info on Windows 2016-09-02 20:52:39 +12:00
Eion Robb
8b46df36b6 tgl Windows Makefile no longer needs scheme version
This change was made a while ago in the Makefile.in but not brought through to the mingw Makefile
2016-09-02 20:51:34 +12:00
Ben Wiederhake
f75e3e9954 Produce new master-pot 2016-08-31 22:55:47 +02:00
Ben Wiederhake
b7283219c0 Makefile: remove superfluous indirection 2016-08-30 00:39:29 +02:00
Ben Wiederhake
80d3146ebb Fix tgl build (don't dep on xxd, don't create empty file)
Fixes #298.
2016-08-30 00:26:12 +02:00
Ben Wiederhake
150f0c48cc Only build required libraries 2016-08-22 22:38:31 +02:00
Ben Wiederhake
4d8995d565 Merge pull request #299 from ilario/master
README.md: add submodule update in Debian package build instructions
2016-08-19 21:48:11 +02:00
Ilario Gelmetti
1798a43d91 README.md: add submodule update in Debian package build instructions 2016-08-19 17:14:45 +02:00
Ben Wiederhake
0340e4f14b Fix description how to build Debian package 2016-08-08 10:53:04 +02:00
Ben Wiederhake
43e5f81683 build: properly clean up 2016-08-08 10:53:04 +02:00
Ben Wiederhake
be0d4cd299 build: proper recursion in make 2016-08-08 10:53:04 +02:00
Ben Wiederhake
de3100e6f2 Minor typos 2016-08-08 10:25:11 +02:00
mjentsch
bf837abf38 Update CHANGELOG 2016-08-08 00:57:04 +02:00
mjentsch
0926d27195 Fix dropped HTML messages
Remove ability to send bold and italic messages to quick-fix a bug that causes
messages with unknown formatting to be dropped by libtgl.
2016-08-08 00:03:19 +02:00
mjentsch
1c32a0ef9e Fix clang warnings. 2016-08-02 01:27:00 +02:00
Ben Wiederhake
99d684bf89 Check for error return values of tgl_init 2016-08-02 01:10:02 +02:00
Ben Wiederhake
f2431f3a3a Fix tgl for OpenSSL-mode 2016-08-02 00:40:41 +02:00
Ben Wiederhake
a6b2ea20e1 Update LINGUAS 2016-08-02 00:04:45 +02:00
Ben Wiederhake
e1242691d2 Comments shouldn't be printed 2016-08-02 00:04:45 +02:00
Ben Wiederhake
b15d0a3f86 Import from Transifex: updated translations. Thank you! 2016-08-02 00:04:45 +02:00
Ben Wiederhake
9a2c6a73ac Import intermediate translation 2016-08-02 00:04:45 +02:00
mjentsch
35faf09857 Merge important crash fixes in tgl 2016-08-01 23:57:13 +02:00
mjentsch
11631ace8b Merge branch 'master' of https://github.com/majn/telegram-purple into dev-1.3.0 2016-08-01 23:28:26 +02:00
mjentsch
7463ef080e Merge HTML href fix in libtgl 2016-07-22 21:05:45 +02:00
mjentsch
e926b216b6 Fix code style 2016-06-30 19:29:55 +02:00
mjentsch
6940278a51 Merge HTML fixes in libtgl 2016-04-10 18:27:21 +02:00
mjentsch
daeb7db701 Only fetch history for joined channels
Prevent loading history for non-joined channels that may occur when messages forwarded for non-joined channels are being fetched.
2016-04-03 17:16:13 +02:00
mjentsch
786394bb3e Fix history in Adium, store channel sequence as account options instead of the blist 2016-04-03 17:04:35 +02:00
mjentsch
01104c87d3 Disable style tags in Adium, not working with Telegram 2016-04-02 22:37:57 +02:00
mjentsch
413e449112 cleanup 2016-04-02 22:28:03 +02:00
mjentsch
5f7da0ab50 Fix use-after-free, improve forward messages 2016-04-02 22:00:08 +02:00
mjentsch
e73e247444 Auto-load audio, video and animated messages up to 8mb
Reduce the amount of annoying popup messages for file transfers. Don't do it for Adium, which doesn't support file-links for security reasons. Make the threshold configurable.
2016-04-02 21:58:08 +02:00
mjentsch
921db6bc5c Fix outgoing message handling 2016-03-28 01:12:35 +02:00
mjentsch
a35c6cdd3b Support sending code tags and improve inline image handling
Properly parse inline img tags in messages to support multiple inline messages in one message.
Adium: remove adium-specific code path and allow embedding markup in outgoing message
2016-03-27 03:00:23 +02:00
Eion Robb
7205b4df1b Update telegram-purple.c to say that the connection supports HTML messages 2016-03-27 03:00:23 +02:00
Eion Robb
952a41f1ed Update tgp-msg.c to flag outgoing messages as HTML 2016-03-27 03:00:23 +02:00
Ben Wiederhake
81f33055b5 Use constant instead of magic string 2016-03-23 16:32:07 +01:00
Ben Wiederhake
7103bf9bfe Remove unused file 2016-03-23 16:32:07 +01:00
Ben Wiederhake
e828fc36ef Allow out-of-vcs builds 2016-03-23 16:32:07 +01:00
Ben Wiederhake
70340d7b55 Extract script to generate origtar 2016-03-23 16:32:07 +01:00
Ben Wiederhake
7439a68b09 Extract script to generate commit.h 2016-03-23 16:32:07 +01:00
Ben Wiederhake
6684a75865 Include HACKING files
Closes #242 by keeping track of all requirements, rationals,
and approaches in a version-controlled file.
2016-03-23 16:32:07 +01:00
Ben Wiederhake
4de2a69ac1 Use correct repository 2016-03-23 16:31:10 +01:00
mjentsch
6a6bff563b Merge branch 'dev-1.3.0' of https://github.com/majn/telegram-purple into dev-1.3.0 2016-03-23 14:00:48 +01:00
mjentsch
c595e9ef14 Always load channel history on startup 2016-03-23 12:57:27 +01:00
mjentsch
236083e217 Fix coding guidelines 2016-03-23 12:49:16 +01:00
mjentsch
aa87311f6d Fix crash on deleted chat 2016-03-23 12:48:14 +01:00
mjentsch
236153cee7 Reduce the amount of needless read recipes being sent 2016-03-23 12:47:24 +01:00
mjentsch
dc9dac44ff Fix compiling Adium plugin 2016-03-23 12:46:29 +01:00
mjentsch
004f84b544 Experimental support for channel history
Fetch missing channel history, keep track of message IDs. Still broken in Adium.
2016-03-23 12:46:04 +01:00
mjentsch
a3341cb5cf Merge branch 'master' into dev-1.3.0 2016-03-20 17:18:37 +01:00
Ben Wiederhake
ee2a6fb740 Merge pull request #254 from rshadow/master
Fix README.md prerequires for deb
2016-03-17 11:21:07 +01:00
Roman V. Nikolaev
ff66ed2512 Fix README.md prerequires for deb 2016-03-17 01:10:35 +03:00
Ben Wiederhake
1388bc6ed7 Fix empty group handling
Fixes #203.
2016-03-11 15:06:35 +01:00
mjentsch
54cfce4df2 Bump version to 1.2.6 2016-03-11 13:10:14 +01:00
mjentsch
d020f9c32a Fix Adium bundle breaking on library version jumps
Link against the generic libpurple and glib bundled with Adium instead of the specific version number to avoid breakage on version updates.
2016-03-11 12:18:08 +01:00
mjentsch
3107a601eb Merge libtgl fix use-after-not-created for photos 2016-02-27 17:59:03 +01:00
mj
cb12fbf4f9 Update group chat link 2016-02-27 17:55:01 +01:00
mj
a0ecd0c66d Merge pull request #246 from khorben/khorben/configure-equals
Portability fix for POSIX shells
2016-02-24 10:28:45 +01:00
Pierre Pronchery
a61c9db881 Portability fix for POSIX shells
Only a handful of shells support the "==" comparison operator for
the "test" built-in. The standard, portable operator is "=" instead.
2016-02-24 03:39:01 +01:00
Ben Wiederhake
0c1623a8f6 Fix the system one more time
Closes #242. Hopefully.
2016-02-19 01:54:07 +01:00
Ben Wiederhake
d4f52a175c Generate and upload new potfile for 1.3.0 2016-02-18 21:41:59 +01:00
Ben Wiederhake
37438544df AppStream: auto-generate translated file 2016-02-18 21:41:59 +01:00
Ben Wiederhake
b45e494771 AppStream: import translations from transifex. Thank you all! 2016-02-18 21:41:59 +01:00
Ben Wiederhake
e5adfc1bd6 Let autogen.sh take care of the .nsi 2016-02-18 21:41:59 +01:00
Ben Wiederhake
5828496b52 Auto-generate .nsi via awk script
Fixes #195
2016-02-18 21:41:59 +01:00
Ben Wiederhake
1398ab1362 README.md: uniform orig-tarball generation 2016-02-18 21:41:59 +01:00
Ben Wiederhake
b30905ef41 Add safety belts when building .orig.tar.gz 2016-02-18 21:41:59 +01:00
Ben Wiederhake
f872bb9bc3 Create a .orig.tar.gz reproducibly
Where "reproducible" means:
Every execution on every machine will always
generate the exact same, bitwise identical result,
when at the same git commit.

Closes #100.
2016-02-18 21:41:59 +01:00
Ben Wiederhake
a00d1ee6c6 Update README.md for Debian installation 2016-02-18 21:41:59 +01:00
Ben Wiederhake
84f742de3a AppStream: add German language 2016-02-18 21:41:59 +01:00
Ben Wiederhake
26e5b2de9f Fix gitignore patterns for *.mo 2016-02-18 21:41:59 +01:00
Ben Wiederhake
8779215927 AppStream: allow for translations
Fixes #211
2016-02-18 21:41:59 +01:00
Ben Wiederhake
cc8873682a AppStream: Add bugtracker, fix XML
Note: I don't care what the header looks like.
I just want the diff between "with translation" and
"without translation" to be as small as possible.
2016-02-18 21:41:59 +01:00
Ben Wiederhake
9b4fa898a9 Reflow AppStream file 2016-02-18 21:41:59 +01:00
Ben Wiederhake
dd349ff7cb Fix typos and errors in strings 2016-02-18 21:41:59 +01:00
Ben Wiederhake
5c88b021af Clean up 'clean' target 2016-02-18 21:41:59 +01:00
Ben Wiederhake
f648686f1b Correctly build commit.h without complaining
The old version threw ugly warnings when commit.h didn't exist (ugh),
and it depended on ifneq, which I don't really like (second ugh).
2016-02-18 21:41:59 +01:00
mjentsch
4e3b913a9d Remove unneeded code 2016-02-17 20:53:20 +01:00
mjentsch
0a786049fc Fix auto-join and bookmarks in Adium
Fix a regression that was caused by automatically adding all chats to the blist. Adiums method for joining chats by name assumes that an existing chat in the blist means we already joined and not join the chat.
2016-02-17 20:52:45 +01:00
mjentsch
abbaad7a0c Support leaving channels and exporting channel invite links 2016-02-14 00:34:30 +01:00
mjentsch
496eb6328f Add hint for phone number 2016-02-10 23:23:54 +01:00
mjentsch
581e024254 Display chat and channel icons, refactor image loading code 2016-02-10 02:03:46 +01:00
mjentsch
1070b5a6e7 Cleanup and add a few notes 2016-02-07 18:23:12 +01:00
mjentsch
e8005883ab Display channels and supergroups in roomlist 2016-02-07 00:40:48 +01:00
mjentsch
fbe3a7fbba Support supergroups and displaying channel members
Change all channels to be chats instead of regular buddies and implement fetching channel memberships. Remove some unneeded code scraps from old channel handling.
2016-02-07 00:04:31 +01:00
mjentsch
4ef719cd3a Emphasize that just the contact will be deleted, not the dialogue list entry. 2016-01-25 23:23:34 +01:00
mjentsch
69acd90512 Support deleting contacts, handle deletions of chats and channels
When a user deletes a buddy list entry, ask if the chat or channel should be destroyed / left or the contact should be deleted. In many cases, deleting a buddy from the blist would have no effect, since the buddy would show up again on the next startup, which is most likely confusing to the user. Just destroying the chat or the channel is dangerous too, so ask for confirmation every time this happens to let the user choose what to do with that entry.
2016-01-25 00:59:56 +01:00
mjentsch
8100114319 Handle contacts added on different devices
Assure to add contacts, even when they are not in the dialog list. Refactor contact handling.
2016-01-25 00:51:33 +01:00
mjentsch
00b709e39f Display incoming read recipes for secret chats
Outgoing still don't work they aren't implemented in libtgl yet.
2016-01-24 22:16:20 +01:00
mjentsch
af70b22699 Handle group chats more intuitively
Remove all left chats from buddy list when selecting to auto-join chats and also make that option default.
2016-01-24 21:36:41 +01:00
mjentsch
660376b9df Remove all left chats
Use new TGLCF_LEFT instead of user count to determine left chats more reliably.
2016-01-24 21:29:48 +01:00
mjentsch
4e08542823 Change version back to 1.3.0 2016-01-24 21:23:35 +01:00
mjentsch
9edcd8f6e5 Fix run scheme in Adium 2016-01-24 21:19:59 +01:00
mjentsch
90a4286e90 Fix compilation error 2016-01-24 20:40:36 +01:00
mjentsch
ac1c748650 Merge branch 'master' into dev-1.3.0 2016-01-24 18:22:18 +01:00
mjentsch
df29bbcda1 Update bundle link 2016-01-24 16:17:10 +01:00
mjentsch
68b71dae70 Fix tgp version displayed as NULL in sessions
Set telegram-purple version in app data, to make the correct version
show up in the session dialogue.
2016-01-24 16:11:33 +01:00
mjentsch
9208d9b1e9 Show version in Adium Xtras
Until now the adium plugin version was only shown in the bundle info,
not inside Adium.
2016-01-24 15:41:15 +01:00
mjentsch
fc0b402d72 Increase version to 1.2.5 2016-01-24 15:17:54 +01:00
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
1808ca4984 Automatically refresh revoked sessions and prompt for a new code 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
625374fbc4 Include libtgl fix for channel messages 2016-01-24 15:17:54 +01:00
mj
65105dd11b Fix group chat link 2016-01-15 18:20:03 +01:00
mjentsch
6eee0c3c43 Use flags instead of users_num to check if a chat is already left 2016-01-12 23:53:49 +01:00
mj
2c74a733d5 Update chat link 2016-01-12 11:15:53 +01:00
mjentsch
9ad31b041a Update submodule branch to include all fixes 2016-01-10 02:12:27 +01:00
mjentsch
ff7300f6c9 Merge branch 'dev-1.2.5' into dev-1.3.0 2016-01-10 01:45:57 +01:00
mjentsch
d032f3a237 cleanup 2016-01-10 01:27:38 +01:00
mjentsch
d8fc5281ce Fix buddy icon refreshing and refactor user info and icon handling
Keep track of loaded pictures to refresh user pictures more reliably. Create new file tgp-info to contain all code related to user information and icons. Clean up the messy code for fetching user info and user pictures and provide a streamlined function in tg-info.
2016-01-10 01:27:38 +01:00
mjentsch
4438dcae0e Include libtgl fix for channel messages 2016-01-09 18:33:31 +01:00
Ben Wiederhake
8e3cebf165 Output commit in debug message on startup
Fixes #214.
2016-01-07 10:53:07 +01:00
Ben Wiederhake
dec3a260c4 Make tgl in appropriate place
Fixes #206.
2016-01-07 10:51:24 +01:00
Ben Wiederhake
a8cf6f88d0 Typos, email-addresses, trailing spaces 2016-01-07 10:51:24 +01:00
Ben Wiederhake
f4f058edb5 Add target noicon_install
This moves the feature #100 from the ./configure option to a make target,
which reduces the combinatory explosion of the ./configure options.
2016-01-07 10:51:24 +01:00
Ben Wiederhake
f958dfe2bc Re-order Makefile to be more sensible 2016-01-06 12:32:06 +01:00
Ben Wiederhake
1e78c9685c Merge branch 'master' into dev-1.3.0
Conflicts:
  rpm/purple-telegram.spec
  tgl
  tgp-ft.c
2016-01-06 12:30:35 +01:00
mj
cf851ad630 Remove Webupd8 PPA until it contains the hotfix 2016-01-06 10:59:46 +01:00
mj
4079aea8c0 Merge pull request #208 from tuxmaster/master
Fix appdata build for rpm.
2016-01-05 11:44:36 +01:00
tuxmaster
e4d04d990b Fix appdata build. 2016-01-05 07:01:14 +01:00
mj
7611afc323 Update README.md 2016-01-05 00:34:35 +01:00
mjentsch
94beda1419 Bump version in configure 2016-01-04 23:38:38 +01:00
mjentsch
10bac37b2c Fix xfer memory leak
Prevent leaking of cancelled xfers and stop warning messages for
"un-completed" file transfers when closing Adium.
2016-01-04 17:37:54 +01:00
mjentsch
c52d8811f3 Update version for hotfix 2016-01-04 17:37:54 +01:00
Ben Wiederhake
1cf511f526 Actually install the appdata file 2016-01-03 16:39:25 +01:00
mjentsch
66ef529edb Fix file transfer memory management 2016-01-03 00:29:53 +01:00
mjentsch
38b9e44a3e Fix crash on unknown messages 2016-01-02 19:56:58 +01:00
mj
0f10389a34 Update documentation for updates
Document how to handle changes in the .gitmodules configuration
2016-01-02 19:54:35 +01:00
Ben Wiederhake
a22204df13 Don't hardcode paths
Sometimes I'm really, really dumb.
2016-01-02 00:58:54 +01:00
Ben Wiederhake
d498c116ed Active logging on Travis 2016-01-02 00:58:54 +01:00
Ben Wiederhake
ef7a655dea Add new test with dummy frontend 2016-01-02 00:58:34 +01:00
Ben Wiederhake
0a349cc38e Fix name of test, fix clean target
Since this is a trivial change, [skip ci]
2016-01-02 00:22:17 +01:00
Ben Wiederhake
f41571934a Slim down combinations
Can't 'skip' this build: the .travis.yml still needs to be checked.
2016-01-02 00:22:17 +01:00
Ben Wiederhake
a0a03fe35e Include new test goals, integrate with Travis 2016-01-02 00:22:17 +01:00
Ben Wiederhake
7ce2d397b8 Implement very basic test.
This can only detect missing symbols or other severe failures.
2016-01-02 00:22:17 +01:00
Ben Wiederhake
cf121a5d59 Build all combinations 2016-01-02 00:22:17 +01:00
Ben Wiederhake
7d7f67f227 Build on trusty 2016-01-02 00:22:17 +01:00
Ben Wiederhake
2d4c06883f gcrypt20 not available in U12.04.5 2016-01-02 00:22:17 +01:00
Ben Wiederhake
9d8db69aad Broken submodule support, need to mention apt-get explicitely 2016-01-02 00:22:17 +01:00
Ben Wiederhake
fbba265512 First version for Travis 2016-01-02 00:22:17 +01:00
Ben Wiederhake
be4f5877c4 Fix compilation error 2016-01-02 00:22:17 +01:00
Ben Wiederhake
26669c8a6c Remove private files 2016-01-02 00:22:17 +01:00
Ben Wiederhake
39177beff9 Refresh/harden .gitignore-files 2016-01-02 00:22:17 +01:00
mjentsch
97f26e9b24 Merge branch 'master' into dev-1.3.0 2016-01-02 00:09:57 +01:00
mj
5b11831e3f Update README.md 2016-01-02 00:04:06 +01:00
mj
d42d647dfe Update README.md 2016-01-01 23:49:30 +01:00
matj
ffca726ca1 Fix compilation with openssl 2015-12-31 16:33:18 +01:00
mjentsch
603f19f641 Fix compilation
Do the libgcrypt check to assure that all necessary flags are included,
and clean up configure.ac a bit.
2015-12-31 16:33:18 +01:00
Ben Wiederhake
be49bdc66b fixup! Introduce --disable-gcrypt flag 2015-12-31 16:33:18 +01:00
mjentsch
a846ef03b0 Revert "Revert "Introduce --disable-gcrypt flag""
This reverts commit 893bb3369c.
2015-12-31 16:31:16 +01:00
mjentsch
893bb3369c Revert "Introduce --disable-gcrypt flag"
This reverts commit 89c27afac1.
2015-12-31 00:14:02 +01:00
mjentsch
eee367bdb0 update readme 2015-12-30 20:30:11 +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
3b3a4eafc2 Merge branch 'dev-1.2.3' into dev-1.3.0 2015-12-30 16:32:28 +01:00
Ben Wiederhake
ad921e866a Care about Windows packaging -- possibly broken 2015-12-30 15:19:43 +01:00
Ben Wiederhake
f1078f2d3a Add proper copyright headers 2015-12-30 15:04:18 +01:00
Ben Wiederhake
89c27afac1 Introduce --disable-gcrypt flag 2015-12-30 14:34:44 +01:00
Eion Robb
b48f7645d6 Update telegram-base.c
Fix whitespace nightmare
2015-12-30 14:34:44 +01:00
Eion Robb
0d7e8923c5 Remove the need for gcrypt in telegram-purple
Use libpurple's own SHA1 implementation
2015-12-30 14:34:44 +01:00
Ben Wiederhake
86f7fe0b9a Import from Transifex: New translations. Thank you! 2015-12-30 14:33:35 +01:00
Ben Wiederhake
5b275a6abb Read po/LINGUAS only in one place 2015-12-30 14:17:42 +01:00
mjentsch
c536cf0aec Ask if secret chats should be accepted by default 2015-12-29 23:47:12 +01:00
mjentsch
c0f3020884 Fix group chats auto-initialized in wrong group 2015-12-29 22:18:11 +01:00
mjentsch
3994fcdcff Assure that the tgl makefile is always updated after configure 2015-12-29 19:50:36 +01:00
mjentsch
085e14287f Make gettext dependency optional 2015-12-29 18:11:29 +01:00
mjentsch
f3091e7e51 Merge remote-tracking branch 'origin/master' into dev-1.2.3 2015-12-29 17:19:13 +01:00
mjentsch
67f9ba830c Bump version to 1.2.3 2015-12-29 17:03:18 +01:00
mjentsch
46485a08c3 Remove redundant code
Existance of print_name is already assured in the check above.
2015-12-29 15:28:57 +01:00
mjentsch
838e08a0e8 Fix coding guidelines 2015-12-29 14:33:03 +01:00
mjentsch
6cadb04fbd Fix glib log errors on joining chats and clean up code 2015-12-29 14:32:13 +01:00
mjentsch
67bc9cea92 Remove testing / debugging code 2015-12-29 12:27:21 +01:00
mjentsch
fc9a7ebb2e cleanup 2015-12-29 12:20:06 +01:00
mjentsch
b2541f14d4 Fix user alias not updated on name changes 2015-12-28 17:49:34 +01:00
mjentsch
c921a91b42 Fix RPC calls failing for users with Umlauts in Adium
Fix issue with name normalization by assuring that the id/name lookup always uses composed strings. Remove the now-unused function in the Adium bundle.
2015-12-28 17:46:39 +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
Ben Wiederhake
855e6fc04e Fix ${LOCALES} in Makefile 2015-12-26 11:22:57 +01:00
Ben Wiederhake
07a27e1edc Add Ben's email address 2015-12-26 11:20:22 +01:00
mjentsch
37c43ac830 Fix double free 2015-12-21 01:35:26 +01:00
mjentsch
877eb1ac04 Fix compilation with gcc 2015-12-20 21:52:56 +01:00
mjentsch
c099d49f41 Do not display read recipes for non-user messages 2015-12-20 15:57:22 +01:00
mjentsch
b828460886 Merge branch 'dev-1.2.3' into dev-1.3.0 2015-12-19 22:02:54 +01:00
mjentsch
65c96cae5a Fix secret chats not being properly canceled 2015-12-19 02:25:04 +01:00
mjentsch
00bf713c43 Fix secret chat not being removed when the other peer ends it 2015-12-19 02:25:04 +01:00
mjentsch
f2fd8a981b coding style 2015-12-19 02:25:04 +01:00
mjentsch
88d3963929 Fix compiler warning
Remove unused function
2015-12-18 23:09:12 +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
Ben Wiederhake
233e6c2811 Generate and upload new potfile for 1.3.0 2015-12-18 13:51:54 +01:00
mj
ab75ad61d5 Update README.md
Include more info about submitting bug reports
2015-12-17 00:20:06 +01:00
mjentsch
ccf28caa8c Adium: Fix adding contacts with non-ascii names to buddy list 2015-12-16 22:37:53 +01:00
mj
aa237bed79 Update README.md 2015-12-15 12:26:30 +01:00
mj
b818752acc Merge pull request #181 from tuxmaster/dev-1.3.0
Prepare for 1.3.0
2015-12-13 13:42:52 +01:00
mjentsch
de17ccb982 Fix trailing whitespace on users without a last name 2015-12-13 01:10:13 +01:00
mjentsch
f681aa21e2 Fix adium bundle not loading 2015-12-13 01:10:13 +01:00
mj
935dea734b Merge pull request #172 from dequis/timer-delete-warnings
timer_alarm: Set fd to -1 to avoid warnings on tgl_timer_delete
2015-12-12 14:37:41 +01:00
mjentsch
9f34c13384 Fix reconnect failing
Fail complete connection when a reconnect to the main data center fails.
2015-12-12 00:55:21 +01:00
mjentsch
ce442eef22 Fix including libgcrypt in Adium bundle 2015-12-12 00:55:21 +01:00
mj
63e006c97c Merge pull request #180 from tuxmaster/dev-1.2.3
Prepare rpm for 1.2.3
2015-12-10 12:32:48 +01:00
tuxmaster
b61131c7e1 Prepare for 1.3.0 2015-12-10 12:30:31 +01:00
tuxmaster
261a1e5f54 Prepare rpm for 1.2.3 2015-12-10 12:28:11 +01:00
mjentsch
97e295ddde Fix format warning 2015-12-10 11:56:48 +01:00
mjentsch
18c2539f75 Fix regressions: chat actions not available for chats 2015-12-09 01:08:45 +01:00
mjentsch
de72552309 Ignore the file containing the current commit hash 2015-12-08 11:24:56 +01:00
mjentsch
b1fb7e500c Improve logging of peer flags 2015-12-08 11:24:01 +01:00
mjentsch
c8befa2c9e Display correct display time for special chats
Bug was introduced a few commits earlier in the test branch during refactoring.
2015-12-07 23:45:15 +01:00
mjentsch
85e7f17e65 Display newly added channels as online 2015-12-07 23:39:53 +01:00
mjentsch
618cbf7001 Handle channel photo updates and channel deletions
Change channel photo on update, delete channels from blist when leaving.
2015-12-07 23:15:17 +01:00
mjentsch
d1d03da879 Create a channel that is created in other clients during the session 2015-12-07 22:28:09 +01:00
mjentsch
60d6b3c8e5 Improve error handling when sending to non-ready secret chats 2015-12-07 00:32:54 +01:00
mjentsch
bab470cf1f Support posting documents to channels 2015-12-07 00:27:16 +01:00
mjentsch
350bdad82e Improve error handling for channels 2015-12-07 00:26:21 +01:00
mjentsch
5bd31bdae0 Add basic channel support 2015-12-06 23:46:09 +01:00
mjentsch
498f87eff5 Remove code duplication 2015-12-06 22:57:50 +01:00
mjentsch
a1f49d4748 Translate plugin description and update version/authors 2015-12-06 22:20:01 +01:00
mjentsch
5d6f9f35bb Remove migration for translated group names
Keep it maintainable and non-intrusive, the affected users can easily move the buddies into the new chat.
2015-12-06 22:04:54 +01:00
mjentsch
b2194b6a5d Translate group names 2015-12-06 20:38:06 +01:00
mjentsch
51e7d211fe Improve logging 2015-12-06 19:21:58 +01:00
mj
22cd6f071b Update README.md 2015-12-06 17:24:28 +01:00
mjentsch
7a6792ff04 Update copyright strings
Add current year where its left out, add missing authors and remove authors without any contributions in that file.
2015-12-05 20:40:08 +01:00
mjentsch
0bb5b0121d Make gettext dependency optional 2015-12-05 20:31:08 +01:00
mjentsch
53c6b384ec Clean up comments in Makefile.in 2015-12-05 16:56:40 +01:00
mjentsch
7d5722462f Display git commit in commit.h 2015-12-05 16:55:03 +01:00
mjentsch
b2845e41aa Clean up code
Order update callbacks just like in libtgl.h
2015-12-05 12:31:18 +01:00
mjentsch
fc1863cca9 Remove (now) unused function declaration. 2015-12-05 11:27:54 +01:00
mjentsch
9019ee1038 Comment-out unused function 2015-12-05 10:48:31 +01:00
mjentsch
eebd337929 Upgrade libtgl that supports layer 42 2015-12-03 23:16:28 +01:00
mjentsch
3670c41f41 Push partial implementation of displaying forwarded messages 2015-12-03 21:31:00 +01:00
dequis
3236a31551 timer_alarm: Set fd to -1 to avoid warnings on tgl_timer_delete
Warnings like this:

GLib-CRITICAL **: Source ID N was not found when attempting to remove it
2015-12-01 21:06:23 -03:00
mjentsch
41b4fd1792 Fix accepting secret chats from buddies not in the buddy list 2015-12-01 21:57:11 +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
3016781b52 Clean up dialog list code and improve logging 2015-12-01 20:44:33 +01:00
mjentsch
b3d538de8a Improve error handling 2015-12-01 18:09:39 +01:00
mjentsch
8845f32454 Update AUTHORS 2015-11-29 22:07:16 +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
202772ed78 Improve robustness against name changes 2015-11-29 13:11:48 +01:00
mjentsch
5502824ac4 Clean up, refactoring and fix coding guidelines 2015-11-28 20:17:47 +01:00
mjentsch
5ae6bdde82 Update authors 2015-11-28 15:02:23 +01:00
mjentsch
2a1a2d2167 Fix Adium compilation
Remove lodepng complation instruction from xcode project.
2015-11-28 14:55:11 +01:00
mjentsch
65fdf2802c Remove "sync all" option that doesn't have any effect
When migrating to libtgl-internal authentication code it became impossible to define the "tgl_do_get_difference" options, which
makes it impossible to fetch past history on first login. As this option used to fetch the whole history since the "beginning of time",
it wasn't a viable option anyways, so removing it was necessary sooner or later. An action to fetch past history for
conversations / chats / globally on demand will be added in the future to make up for this.
2015-11-28 14:54:11 +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
bf70a184e1 Cleanup and coding guidelines 2015-11-28 02:14:31 +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
18a4d51b94 Upload new potfile 2015-11-26 08:23:25 +01:00
Ben Wiederhake
b44a218b22 Clean up strings 2015-11-26 08:23:25 +01:00
Ben Wiederhake
00cd867f6c Import potfile from transifex
This commit should be dated 2015-10-20 00:14:21
2015-11-26 08:23:25 +01:00
Ben Wiederhake
d2a3a7dc6f Fix autogen issue (symbol was not properly exported) 2015-11-26 08:23:25 +01:00
Ben Wiederhake
b5521b1688 Polish some more 2015-11-26 08:23:25 +01:00
Ben Wiederhake
7812603dee Fix typo 2015-11-26 08:23:25 +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
Ben Wiederhake
f53f13592a Disable unused feature 2015-11-26 08:21:09 +01:00
Ben Wiederhake
669880ab4d Fix color channels: TGA uses BGRA, not RGBA 2015-11-25 20:32:31 +01:00
Ben Wiederhake
8d8f299aec Drop LodePNG 2015-11-25 20:32:31 +01:00
Ben Wiederhake
98221ec036 Implement basic raw-to-tga conversion 2015-11-25 20:32:31 +01:00
Ben Wiederhake
2f467a2591 Fix missing inclusion 2015-11-25 20:31:44 +01:00
mjentsch
e10c548dd1 Fix compilation of plugin 2015-11-25 11:31:07 +01:00
mjentsch
a7be036a05 Remove unused commented-out code 2015-11-23 11:47:29 +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
9ee84e73a2 Remove unneeded class includes in Adium plugin 2015-11-23 02:56:41 +01:00
mjentsch
a11c8da4fa Remove unneded unix-specific includes 2015-11-23 02:55:44 +01:00
mjentsch
05131d999e Remove code duplication 2015-11-23 01:33:20 +01:00
mjentsch
23507c0303 Fix compilation 2015-11-23 00:44:52 +01:00
mjentsch
643a30faa7 Do not rely on g_utf_8_substring length checking, it doesn't always do it 2015-11-23 00:37:23 +01:00
mjentsch
9a166cbc8b Cleanup and coding guidelines 2015-11-21 22:43:16 +01:00
mjentsch
72070e0016 Fix potential segfault 2015-11-21 22:42:07 +01:00
mjentsch
3cc0a832a9 Remove dead code and unused functions 2015-11-21 22:21:00 +01:00
mjentsch
f094319519 Fix typos 2015-11-21 22:20:38 +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
e5e58d0c2f Fix compiler error in MinGW 2015-11-21 16:31:15 +01:00
mjentsch
602edc8b5f Cleanup and coding guidelines 2015-11-21 16:30:50 +01:00
mjentsch
a44600a0ac Fix static analysis warning 2015-11-21 16:24:17 +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
1a428ed80a Do not needlessly enable pfs anymore 2015-11-21 09:48:02 +01:00
mjentsch
05fc97381f Cleanup and slightly improve labels 2015-11-21 09:47:33 +01:00
mjentsch
5d52fce666 Fix compilation on Unix 2015-11-21 09:42:53 +01:00
mj
6cfeeb4835 Merge pull request #159 from tuxmaster/master
Fix rpm spec file.
2015-11-21 09:27:22 +01:00
mjentsch
2fc4f53831 Merge branch 'EionRobb-beta4' into cleanup-requests 2015-11-21 01:14:36 +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
09339c7785 Update adium bundle to 1.2.2 2015-11-21 00:39:14 +01:00
mjentsch
b10dc45bfc Fix secret chat duplication issue 2015-11-21 00:28:29 +01:00
mjentsch
dc27b1ec03 Display secret chat once its ready 2015-11-21 00:18:08 +01:00
mjentsch
0826bcad76 Improve logging messages for peer updates 2015-11-21 00:14:52 +01:00
mjentsch
97f619b1d0 Fix crash 2015-11-21 00:13:58 +01:00
tuxmaster
2e3951f5a5 Add missing space. 2015-11-18 15:05:10 +01:00
tuxmaster
f7b01583fc Add required version for libgcrypt. 2015-11-18 15:03:40 +01:00
mjentsch
81cf092554 Fix adding foreign buddy
Fix user info and user status not being correctly fetched.
2015-11-18 01:19:40 +01:00
tuxmaster
2f5c70b04b -Fix date for rpm spec file. 2015-11-17 18:53:09 +01:00
mjentsch
b721e8d217 Fix secret chats being duplicated on login 2015-11-16 16:15:20 +01:00
mjentsch
85df0e0bcd Fix status not updated for all buddies 2015-11-16 15:48:30 +01:00
mjentsch
6e210b8417 Improve comments and logging messages 2015-11-16 15:47:32 +01:00
mjentsch
8ee4f680c2 Fix own name being added to the buddy list 2015-11-16 15:43:32 +01:00
mjentsch
a77adfaf0d Fix offline messages being received on wrong conversations
Fix buddy messages are being received before buddy list was initialized, by changing the state to CONNECTED
on "logged in" event and not on "ready".
2015-11-16 15:41:51 +01:00
mjentsch
b6dd5adad7 Implement create / change password requests. 2015-11-16 10:05:03 +01:00
mjentsch
87225d7098 Fix sign in dialogue and clean up password prompt
Use purple_input_request with the masked bit set, instead of needlessly creating a request with generic fields. Implement correct sign in dialogue only queries for first and last name.
2015-11-16 10:04:41 +01:00
mjentsch
58b7f8c7f9 Coding style 2015-11-15 14:55:36 +01:00
mjentsch
e3d67dd47f Add missing string translations 2015-11-15 14:54:12 +01:00
mjentsch
4b68797f89 Remove pointless "create chat" confirmation dialogue 2015-11-15 14:51:40 +01:00
mjentsch
f89f3fd71a Remove code duplication in sign-in procedures
Use the new libtgl request_values callback to query inputs from the user instead
of implementing the sign-in methods manually.
2015-11-15 14:04:00 +01:00
mjentsch
6fce2cf8fa Fix sign in not starting for new accounts 2015-11-14 14:28:10 +01:00
mj
3a9f1e2cfe Merge pull request #145 from Sesivany/master
Adding AppData file
2015-11-13 23:40:27 +01:00
mjentsch
57a76fdabd Fix confusing comment 2015-11-13 22:50:26 +01:00
mjentsch
5dcf2687ca Update changelog 2015-11-12 22:22:48 +01:00
mjentsch
82971299a7 Do not write to secret file when reading a secret chat from it 2015-11-12 21:14:12 +01:00
mjentsch
9aa597edfc Include merge of "secret chat fix" pull request. 2015-11-12 21:14:12 +01:00
mjentsch
50c4b2ead7 Allow passing configure flags to libtgl subproject
Pass compiler and linker flags down to libtgl Makefile, when calling configure.
2015-11-12 21:14:12 +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
90b4e3b5b5 Fix secret chat name and fingerprint
Correctly initialize secret chat fingerprint and print name when loading the chats from the secret file.
2015-11-12 21:14:12 +01:00
mjentsch
3fe025e877 Improve secret chat robustness.
Do not crash when removing secret chats and the print_name is not set
anymore.
2015-11-12 21:14:11 +01:00
mjentsch
f7bcbe8851 Update tgl version 2015-11-12 21:14:11 +01:00
Ben Wiederhake
f1d7a67a4b Import from Transifex: uk. Thank you! 2015-11-01 21:47:21 +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
cb0bbe5b1c cleanup 2015-10-31 21:49:56 +01:00
mjentsch
4c32efddc2 Do not crash when opening / hovering over unmigrated buddies 2015-10-31 21:46:54 +01:00
mjentsch
46b5fa25b9 Do not brick secret chats when sending documents
At least make sure to cancel _all_ file transfers to encrypted chats, until the secret chat file transfer issue is properly fixed.
2015-10-31 21:46:20 +01:00
mjentsch
42543706b4 Remove "Start secret chat ..." action from secret chats 2015-10-31 20:38:56 +01:00
mjentsch
e3892cab16 Fix leaving and removing chats again 2015-10-31 20:34:47 +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
mjentsch
87278f6742 Merge branch 'tuxmaster-beta4-2' into beta4 2015-10-30 19:16:55 +01:00
mjentsch
e90c7aa0f8 Merge branch 'beta4' of https://github.com/tuxmaster/telegram-purple into tuxmaster-beta4-2 2015-10-30 19:16:34 +01:00
mjentsch
895c8dc14f Merge branch 'beta4' of https://github.com/majn/telegram-purple into beta4 2015-10-30 19:03:55 +01:00
Eion Robb
6e78b51527 Missed a couple more binary file open()s 2015-10-25 15:32:03 +13:00
Eion Robb
7f64b57461 Set binary flag on open() calls so that windows doesn't terminate files early 2015-10-25 15:22:34 +13:00
Eion Robb
ed2f9d527c Add a make installer option that builds an exe installer using NSIS 2015-10-24 19:17:29 +13:00
Eion Robb
fde3af9f4c Add mingw Makefile/config's 2015-10-24 12:31:11 +13:00
Eion Robb
5a0ee5b22e Enable PFS
Seems to be the only way to trigger all the events loop in libtgl
2015-10-24 11:21:18 +13:00
Eion Robb
a8bad2e361 Use send()/recv() on sockets
and apply it to the right branch this time
2015-10-24 11:11:42 +13:00
Ben Wiederhake
70acb337cf Merge branch 'master' into develop
Conflicts:
	README.md
2015-10-22 11:35:42 +02:00
Eion Robb
8562eb342c Allow compiling on Windows 2015-10-22 21:41:37 +13:00
mj
6bc8fb49e2 Update README.md 2015-10-21 10:51:00 +02:00
mj
ddb94969dd Update README.md
Add note about missing Windows support.
2015-10-21 10:49:56 +02:00
Ben Wiederhake
75e1efdb86 Use https where possible 2015-10-20 18:36:27 +02:00
Ben Wiederhake
31768d1e4d Use new lodepng version 2015-10-20 18:28:11 +02:00
Ben Wiederhake
af3d14bec0 Import from Transifex: fr, pt_BR, ru. Thank you all!
See previous commit for 'ru'.
2015-10-20 18:25:05 +02:00
Ben Wiederhake
3edab136cd Update translations due to previous commit 2015-10-20 18:22:33 +02:00
Ben Wiederhake
a155d4b41c Update translation strings, positions, and Transifex 2015-10-20 18:22:33 +02:00
Ben Wiederhake
59d9cc88a9 Fix autogen incompatibility
Also, only regenerate the parts that actually have changed.
2015-10-20 18:22:04 +02:00
Matthias Jentsch
b8e73f819c Fix compilation errors and warning when disbaling libwebp 2015-10-20 14:15:50 +02:00
Matthias Jentsch
ee9626e6da Merge remote-tracking branch 'wiederhake/beta4' into beta4 2015-10-20 12:38:40 +02:00
Jiri Eischmann
8ece7fcccc Fixing license in the appdata file 2015-10-20 00:16:41 +02:00
Matthias Jentsch
728da04d3c Try to fix failing reconnect after hibernate 2015-10-19 19:05:50 +02:00
mjentsch
b98b742c14 Fix Adium reconnect after hibernate and not disconnecting properly 2015-10-18 21:18:12 +02:00
Jiri Eischmann
5a72023848 Adding AppData file 2015-10-18 18:42:29 +02:00
majn
3824eae025 Fix empty file in pidgin after transfer
Fetch local filename before calling purple_xfer_end to avoid that the local filename contains bogus.
2015-10-18 01:21:18 +02:00
mjentsch
c2873d2e3f Fix libgcrypt check
Use a libgcrypt check that will only succeed with a version >= 1.6.0.
2015-10-17 23:49:41 +02:00
mjentsch
d43f4f0d64 Use better names 2015-10-17 23:11:15 +02:00
mjentsch
bd7662aaeb Do not crash when displaying the tooltip of an old user 2015-10-17 21:18:42 +02:00
mjentsch
306273d4c4 Merge branch 'beta4-human-reable-user-names' into beta4 2015-10-17 18:09:42 +02:00
mjentsch
9f96be976d clearer function names 2015-10-17 14:51:09 +02:00
mjentsch
df5a168a1f Remove unneeded and confusing messages 2015-10-17 00:26:00 +02:00
mjentsch
5c76324b78 cleanup 2015-10-17 00:00:25 +02:00
mjentsch
5f2da4b4fc Avoid nullpointer dereference when purple requests actions on deleted telegram secret chats 2015-10-16 23:32:49 +02:00
mjentsch
3f2f557284 Use clearer names for name and id resolution functions and clean up 2015-10-16 22:45:21 +02:00
Ben Wiederhake
4e43a6208a Import from Transifex: es_AR, pl, sq. Thank you all! 2015-10-16 00:42:08 +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
mjentsch
adeacb7c42 Remove flag that is no longer used in update_buddy 2015-10-16 00:15:37 +02:00
mjentsch
b25eeb6951 Cleanup and coding style 2015-10-16 00:14:36 +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
tuxmaster
96f689ca1c - Use the better pkconfig for build requires.
- Add translations.
- Switch to libgcrypt from openssl.
- Modify Readme for the new requirements of the build for Fedora.
2015-10-14 15:28:00 +02:00
Ben Wiederhake
56445b4821 Fix annoying 'missing config.h' error. 2015-10-14 01:15:14 +02:00
Ben Wiederhake
512c052cdc Add Makefile targets local_{,un}install. 2015-10-14 01:15:14 +02:00
Ben Wiederhake
b9a1ab23be Allow loading alternative pubkey from local, as a fallback. 2015-10-14 01:15:14 +02:00
Ben Wiederhake
829b9f996f Mark static function as static. 2015-10-14 01:15:14 +02:00
Ben Wiederhake
f444ae0866 Fix *install* targets.
Fixes #47 by removing the feature, as it seems that nobody uses it.
If you would like to see a feature like this again, please open a new
bug and reference either this commit or issue #47.
2015-10-14 01:15:14 +02:00
Ben Wiederhake
d83d1df00d Add option --disable-icons.
Closes #100.
2015-10-14 01:15:14 +02:00
Hugues Morisset
ada7a5018f Add build package build step in README 2015-10-14 01:15:14 +02:00
Ben Wiederhake
029c1eece3 Rebasing mistake. Sorry. 2015-10-12 19:58:48 +02:00
Ben Wiederhake
7c6831ee93 Include latest translations to demo. 2015-10-12 19:09:46 +02:00
Ben Wiederhake
c1888926df Dumb typos. Sorry. 2015-10-12 18:48:56 +02:00
Ben Wiederhake
d923ed1130 Beautify and fix strings (part 2/2). 2015-10-12 18:40:21 +02:00
Ben Wiederhake
65336849fb Beautify and fix strings (part 1/2). 2015-10-12 13:27:46 +02:00
mjentsch
cf8f4da2fb Assure that buddy names and images are being updated correctly 2015-10-11 23:51:40 +02:00
mjentsch
7813cedb06 Update Adium package to new user management
Add new files to xcode project, remove now useless "workaround" for setting chat participant aliases, set user ids to case insensitivity so normalization doesn't break the plaintext usernames.
2015-10-11 14:38:56 +02:00
mjentsch
365f7b1da1 Provide utility function for printing system messages in all chat types 2015-10-11 14:19:37 +02:00
mjentsch
61597e9101 Remove manual "group" creation, use blist utility function instead 2015-10-11 14:18:42 +02:00
mjentsch
527f16985d Remove dead code 2015-10-11 14:17:47 +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
ab762710e4 Add notice that installation on Debian will eventually become easier 2015-10-09 09:29:47 +02:00
Ben Wiederhake
cac87f92b8 Fix sticker resizing.
So far, a sticker of size 1028x1028 would have been resized to 128x128,
even though the maximum was set to 256x256.
This fix introduces a different way of resizing, which means that any dimension
of length >256 will result =256.

Also, I factored out the maximum size, so maybe we can make this an option in the future.
2015-10-08 17:44:12 +02:00
Ben Wiederhake
e26416bc49 Standardize password prompt. 2015-10-08 12:59:17 +02:00
Ben Wiederhake
7f9c8122b0 Make 'clean' a recursive target. 2015-10-08 00:03:32 +02:00
Ben Wiederhake
0dc2c750ae Fix typo.
Beleive it or not, credits for discovering this typo go to
...
lintian.

This thing is a hell of a tool. Thank you, lintian developers.
2015-10-07 23:54:55 +02:00
Ben Wiederhake
7a7480ae9d Ensure that local directories exist.
Fixes #47.
2015-10-07 22:54:00 +02:00
Ben Wiederhake
f3acef6737 Fix a few unimportant memory leaks. 2015-10-07 22:07:56 +02:00
Ben Wiederhake
ed9505400d Remove dead code. 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
Ben Wiederhake
d96002ac97 Fix support for install. 2015-10-07 22:07:56 +02:00
Ben Wiederhake
d0bbd773fc Fix ordering of autoheader/autoconf.
Running autoconf when config.h.in is missing yields warnings,
so don't do that.
2015-10-07 22:07:56 +02:00
Ben Wiederhake
d1d6865a0a Remove superfluous -lm flag. 2015-10-07 22:07:56 +02:00
mjentsch
7f3cf7c58f Bump version to 1.2.2 2015-10-07 21:52:35 +02:00
mjentsch
fe3bc9e3fc Update tgl version 2015-10-07 14:16:40 +02:00
mjentsch
e557e72ab4 Update version in README 2015-10-07 14:16:18 +02:00
mjentsch
7838f242ae Coding style 2015-10-07 03:28:37 +02:00
mjentsch
6caed24f0d Integrate libgcrypt header in config.h.in 2015-10-07 03:23:09 +02:00
mjentsch
27c69851eb Ignore compiled translation catalogs 2015-10-07 03:19:28 +02:00
mjentsch
86ec16e73d Update translation HOWTO 2015-10-07 03:18:34 +02:00
mjentsch
6be41aa18b Add even more missing translation strings 2015-10-07 03:06:08 +02:00
mjentsch
94c24a1120 Add German locale 2015-10-07 02:09:38 +02:00
mjentsch
7bc5ac54da Fix configure script
Remove intltool checks failing because of missing po/Makefile.in and just check for msgfmt instead.
2015-10-07 02:07:23 +02:00
mjentsch
8a0e43d128 Use package name as gettext package name 2015-10-07 01:41:21 +02:00
mjentsch
6d16be5238 Support installing/uninstalling the localizations 2015-10-07 01:38:17 +02:00
mjentsch
2abe43cd96 Fix plugin init function
Change include order to not fail PURPLE_PLUGIN_INIT.
2015-10-07 01:30:28 +02:00
mjentsch
6a465b24a1 Fix broken inclusion of gettext translation 2015-10-06 21:45:26 +02:00
mjentsch
688f628890 Consolidate user messages 2015-10-06 19:23:07 +02:00
mjentsch
ffef370ae1 Translate a few more left-out strings 2015-10-06 14:37:12 +02:00
mjentsch
b297944650 Add skeletons for translation catalogs 2015-10-06 14:37:12 +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
a91a6ab304 Add translation-related stuff to configure.ac 2015-10-06 14:26:40 +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
mjentsch
f8cf133c06 Use libgcrypt in Adium plugin 2015-10-05 12:02:00 +02:00
mjentsch
a7043fd5cc Update README 2015-10-05 12:00:53 +02:00
mjentsch
63f7edc2f9 Update tgl vers. and set gitmodule to test branch 2015-10-05 11:36:31 +02:00
mjentsch
1e8513909d Merge remote-tracking branch 'tuxmaer/pull_request' into beta4 2015-10-05 00:13:29 +02:00
Ben Wiederhake
7ad9a0a45c Fix inclusion type. 2015-10-04 17:51:49 +02:00
Ben Wiederhake
b469af3582 Make tgl_timer_insert robust against double insertion 2015-10-04 17:51:49 +02:00
Ben Wiederhake
6dc58df1c2 Fix overcleaning. 2015-10-04 17:51:49 +02:00
Ben Wiederhake
7ab7f4126e Avoid the PEM issue. 2015-10-04 17:51:49 +02:00
Ben Wiederhake
57e6a777d9 Build telegram-purple and libtgl without OpenSSL (skip when bisecting).
This version still tries to load a PEM file, although libtgl
--disable-openssl does not support it. Since there are several
ways to resolve it, this switch away from OpenSSL and its solution
should be different commits.
2015-10-04 17:51:49 +02:00
Ben Wiederhake
47bd4b2b33 Use new API, fix build system. 2015-10-04 17:51:49 +02:00
mjentsch
858177626c Update README
Add documentation about telepathy-haze and third party repositories
2015-10-03 02:18:27 +02:00
mjentsch
f4755bd65b Update XCode project to include new files and update SDK version to 10.11 2015-10-03 02:12:58 +02:00
mjentsch
5064acaaf9 Cleanup an coding guidelines 2015-10-03 02:12:58 +02:00
mjentsch
4c576524e4 Move requests into separate file 2015-10-03 02:12:58 +02:00
mj
3a53dd8540 Merge pull request #129 from BenWiederhake/master
Create files for copyright management (non-specific to Debian)
2015-10-03 02:12:03 +02:00
Hugues Morisset
9529f44802 Add COPYING file 2015-10-02 23:17:18 +02:00
Hugues Morisset
6d730f4610 Add AUTHORS file 2015-10-02 23:17:18 +02:00
tuxmaster
aa7a8d43f6 - Aktualisieren temporär entfernt. 2015-09-30 12:59:36 +02:00
tuxmaster
ba790edb64 - remove unneeded requirements from rpm spec file
- remove source code fix from rpm spec file
- fix source code permissions
2015-09-30 12:53:59 +02:00
tuxmaster
9a4216e170 - Hilfsprogramm zum syncron halten 2015-09-30 10:32:13 +02:00
mjentsch
8c6e4e6079 Update spec file 2015-09-17 20:24:28 +02:00
mjentsch
586268424a Merge branch 'fix-group-participant-aliases' 2015-09-17 20:06:18 +02:00
mj
4ffb777496 Merge pull request #118 from shlomif/remove-executable-bit-from-source-files
Remove executable bit
2015-09-17 10:39:24 +02:00
mjentsch
04df0afa95 Fix segfaults when adding chat 2015-09-17 00:00:53 +02:00
mjentsch
95664e1358 Better input validation in adium chat print name callback 2015-09-16 23:52:46 +02:00
Shlomi Fish
f6f01c848f Remove executable bit 2015-09-16 17:48:56 +03:00
mj
973e209e2c Merge pull request #117 from shlomif/shlomif-fix-typos
Fix spelling/grammar/etc. errors
2015-09-16 16:46:51 +02:00
Shlomi Fish
be5bbbc682 Add missing comma 2015-09-16 17:37:28 +03:00
Shlomi Fish
b334efc5c8 Fix a misphrasing 2015-09-16 17:36:13 +03:00
Shlomi Fish
5762d48339 Fix a misphrasing 2015-09-16 17:33:56 +03:00
Shlomi Fish
f9960c1f6e Fix misphrasing 2015-09-16 17:33:26 +03:00
Shlomi Fish
562df1ad7c Fix misphrasing 2015-09-16 17:32:31 +03:00
Shlomi Fish
37f86fda7e Fix misphrasing 2015-09-16 17:31:49 +03:00
Shlomi Fish
6afe244757 Correct “mail” to “E-mail” 2015-09-16 17:29:15 +03:00
Shlomi Fish
00658a322a Fix a misphrasing 2015-09-16 17:28:28 +03:00
Shlomi Fish
6fca984210 Fix typo - "these" 2015-09-16 17:27:05 +03:00
Shlomi Fish
54094572d0 Fix typo - "prebuilt" 2015-09-16 17:26:33 +03:00
Shlomi Fish
10e9d17121 Fix a typo - 'requires' 2015-09-16 17:24:56 +03:00
Shlomi Fish
4da40ecbc1 Fix a double phrase 2015-09-16 17:23:15 +03:00
mjentsch
470f3fd5cb Fix joining by roomlist when setting an alias 2015-09-14 23:40:26 +02:00
mjentsch
50367783db Do not display outgoing captioned images in group chats twice 2015-09-14 22:03:36 +02:00
mjentsch
32161b1558 Revert "Fix auto joining chats on connection"
This reverts commit fa9b331b39.
2015-09-13 22:24:22 +02:00
mjentsch
114dedcdc9 Do not add deleted users to buddy list and clean up a bit 2015-09-13 15:50:16 +02:00
mjentsch
cf536552b5 Bump version and update README 2015-09-12 23:29:47 +02:00
mjentsch
fa9b331b39 Fix auto joining chats on connection
Only set the connection status to online when all chat info was fetched,
to avoid annoying chat creation requests on startup.
2015-09-12 22:38:28 +02:00
mjentsch
4341bf0804 Fix showing joining chats by roomlist 2015-09-12 22:23:24 +02:00
mjentsch
dac0632ab1 Coding style and cleanup 2015-09-12 22:22:40 +02:00
mjentsch
c3f48b9835 Don't automatically add all chats to the buddy list
This should fix issue where left chats show up in the blist and cannot be removed anymore and broken Adium bookmarks.
This patch should make the whole chat handling much more native to libpurple, in which chats are added through the chatlist,
the join-chat window or automatically when incoming messages are received. Add a new option "Add chats to buddy list" in
case anyone wants the old behavior.
2015-09-12 22:21:27 +02:00
mjentsch
ce51b0bb68 Provide chat info defaults to allow joining chats from roomlist 2015-09-12 12:34:23 +02:00
mjentsch
665f27c279 Add missing account type check to adium signal handler 2015-09-11 22:55:46 +02:00
mjentsch
1004a4005d Fix user names not being displayed in group chats
Add users to temporary group "Telegram Foreign", to assure that the user
alias is always known to Pidgin. Don't store this group permanently but
drop it when closing.
2015-09-11 21:35:27 +02:00
mjentsch
66a1536d4b Fix segfault when receiving msg_send_done callback without a message
cherry-picks 936c541361 from branch
fix-group-participant-aliases
2015-09-08 22:40:38 +02:00
mjentsch
0c06c63dc8 Fix support for old glib versions 2015-09-08 22:28:24 +02:00
mjentsch
d9ca1c0f51 coding style 2015-09-08 22:17:43 +02:00
mjentsch
4670e3ede4 Don't add contacts when adding new buddy
The user should be able to just add buddies to the buddy list without any further side effects, especially
considering you now need to add any user not in the dialog list if you want him to show up.
2015-09-08 22:16:53 +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
e82fef3826 Prevent flood warnings
Only load user info on first start when the user actually has a pic to display.
2015-09-08 22:09:15 +02:00
mjentsch
546bcdc760 cleanup 2015-09-08 22:07:27 +02:00
mjentsch
de131bd3cc Fix bug that caused dialog list to not be loaded 2015-09-08 21:06:12 +02:00
mjentsch
5d187216cf Only get user info for dialogs that actually have a photo 2015-09-08 19:27:58 +02:00
Matthias Jentsch
2d7d1016a8 Better input validation for phone numbers 2015-09-08 17:06:57 +02:00
mjentsch
936c541361 Fix segfault when receiving msg_send_done callback without a message 2015-09-08 17:06:56 +02:00
mjentsch
ff2df0861b Add users in bulk to generate better join-messages in Finch 2015-09-08 17:06:56 +02:00
mjentsch
e665729ee2 Do not remove contact when deleting buddy list node, this is not obvious to the user 2015-09-08 17:06:56 +02:00
mjentsch
31c1037e4d Small fixes and cleanup 2015-09-08 17:06:56 +02:00
mjentsch
3dfb1ac17e Make sure to clear users when leaving chat with non-pidgin clients 2015-09-08 17:06:56 +02:00
mjentsch
ccc6dab512 fix input validation 2015-09-08 17:06:56 +02:00
mjentsch
620d4d5b8b Fix issue that caused newly created chats to not open 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
abd316a659 Support leaving and deleting chats 2015-09-08 17:06:55 +02:00
mjentsch
791b048eb1 Fix crash in Adium when exporting a non-existing chats link 2015-09-08 17:06:55 +02:00
mjentsch
6dd94bc3bc Fix certain chats now showing up when opening through Adium dialougue. 2015-09-08 17:06:55 +02:00
mjentsch
6ad121bb88 Fix segfault 2015-09-08 17:06:55 +02:00
mjentsch
f79897ec8e Fix chat participant names in Adium
first attempt, probably might cause issues with concurrency...
2015-09-08 17:06:55 +02:00
mjentsch
644416aa89 Display user aliases of users not in the buddy list in group chats 2015-09-08 17:06:55 +02:00
mj
b0ac19fc5f Merge pull request #111 from tuxmaster/master
- Fix rpmlint errors in the spec file.
2015-09-05 11:14:09 +02:00
tuxmaster
4509ccacb7 - Fix rpmlint errors in the spec file. 2015-09-02 17:00:30 +02:00
mjentsch
f770abce19 Include RPM-fix by tuxmaster 2015-09-01 00:21:03 +02:00
mjentsch
f6691e0c63 Update telegram-adium version and depend on 1.5.10 2015-08-30 21:58:09 +02:00
mjentsch
227fe399bb Don't break config window in telegram-adium 2015-08-30 21:58:09 +02:00
mj
c4a17ca0b5 Merge pull request #107 from flocke/master
Some minor build improvements
2015-08-30 21:10:32 +02:00
Jakob Nixdorf
75a9b56ddb Use pkg-config found in configure in make. 2015-08-29 18:37:02 +02:00
Jakob Nixdorf
3fbe1079bc Set the 'ar' command as variable in Makefile.tgl
Allows the location of the ar binary to be changed by passing the argument AR=/path/to/ar to make.
2015-08-29 18:33:28 +02:00
mjentsch
f10b683fc9 Merge branch 'final' 2015-08-29 17:33:03 +02:00
mjentsch
31afb76895 Update README 2015-08-29 17:31:38 +02:00
mjentsch
8e87c16c75 Update own user-name properly 2015-08-29 14:22:32 +02:00
mjentsch
8a80eeccae Remove network logging temporarily 2015-08-29 13:44:26 +02:00
mjentsch
793b1fc0fb Disable defective set_buddy_icon temporarily 2015-08-29 12:57:16 +02:00
mjentsch
2b15603685 Always add secret chats to buddy list
Active secret chats should always show up in the buddy list, since there's the only endpoint for a conversation.
2015-08-29 12:56:36 +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
mjentsch
1a8172e922 Fix issue that caused sending captioned images to fail in Pidgin 2015-08-27 23:40:08 +02:00
mjentsch
ee48642232 Change module source to my own fork until it is merged 2015-08-26 23:41:33 +02:00
mjentsch
2e7bd3e3c6 Update README 2015-08-25 23:02:23 +02:00
mjentsch
153762c5af Bump version 2015-08-25 21:58:58 +02:00
mjentsch
70b03b969c Try to fix secret chat corruption 2015-08-25 21:54:15 +02:00
mjentsch
5e65a6675c Fix compilation 2015-08-22 13:42:44 +02:00
mjentsch
8af1991bc8 Update libtgl and fix receiving file transfers of audio and video documents 2015-08-22 13:34:53 +02:00
mjentsch
b5198b3184 Clean up and update README 2015-08-22 13:13:19 +02:00
mjentsch
f5ec7f3e80 Rework buddy list handling
Only add buddies that are on the dialogue list or were explicitly added by the user, to prevent adding non-related users that are now allocated due to protocol updates.
2015-08-22 13:07:11 +02:00
mjentsch
9f71a73632 Remove makefile as dependency from XCode project, only caused trouble 2015-08-22 12:27:34 +02:00
mjentsch
0b95f05da0 Update libtgl 2015-08-16 21:35:43 +02:00
mj
ba868f7f24 Merge pull request #97 from surrim/dnf
using fedora's dnf instead of deprecated yum
2015-08-04 17:41:22 +02:00
surrim
c0b6329b71 using fedora's dnf instead of deprecated yum 2015-08-04 15:20:57 +02:00
mjentsch
4b96e3cb34 Do not display notifications and sounds for messages that were already read on other devices
This should make receiving message history a little less annoying when not using the client for a long time, while still getting the full history in your log.
2015-08-02 19:52:30 +02:00
mjentsch
dc5bc8d039 Improve error handling 2015-08-01 23:34:00 +02:00
mjentsch
8ebd970fbc Escape webpage messages properly 2015-07-31 12:53:24 +02:00
mjentsch
dd6031900e Cleanup 2015-07-30 21:49:13 +02:00
mjentsch
ea12251897 Fix chat creation 2015-07-30 21:46:03 +02:00
mjentsch
7be7fb12f4 Fix video and audio file names 2015-07-30 21:02:22 +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
f810ac5b94 Update user list in chats properly 2015-07-28 21:28:28 +02:00
mjentsch
54c6f4d519 fix bug 2015-07-24 14:28:18 +02:00
mjentsch
254293bc2c Display new chats after creation 2015-07-24 14:27:20 +02:00
mjentsch
61cddd1340 Support for joining chats by invite link 2015-07-24 14:26:13 +02:00
mjentsch
287ace46a4 Support autocompletion in chat creation windows
Offer several autocompletion fields instead of a list of users in Adium and Pidgin.
2015-07-24 14:25:05 +02:00
mjentsch
3a2af54fad Coding style 2015-07-19 16:16:21 +02:00
mjentsch
c5b98eccb2 Increase dialog list limit to ensure that we always get old chats 2015-07-19 16:15:30 +02:00
mjentsch
a4c5bca05f Support creating chat invitation links 2015-07-19 15:18:59 +02:00
mjentsch
e14b681d6e Fix segfault 2015-07-19 15:07:27 +02:00
mjentsch
747c214dcd Support creating new chats
Offer creating a new chat when trying to join a non-existing chat and
add user choice dialogue...
2015-07-18 03:00:11 +02:00
mjentsch
5a06970c23 Hotfix when one DC is not available 2015-07-12 23:01:04 +02:00
mjentsch
c7898c7596 Support image captions 2015-07-11 19:50:55 +02:00
mjentsch
01e7f8da2b Improve printing geo positions 2015-07-11 19:50:32 +02:00
mjentsch
cd1e8d8020 Mask password in settings ... 2015-07-11 19:35:07 +02:00
mjentsch
47812f2f72 Improve string sanitation in fallback chat 2015-07-11 19:34:19 +02:00
mjentsch
8f790253a7 Improve geo position link and support printing venues 2015-07-11 18:31:03 +02:00
mjentsch
ed1f91123e remove unused functions and clean up 2015-07-11 17:44:49 +02:00
mjentsch
51064e06b4 Update tgl version 2015-07-11 17:41:50 +02:00
mjentsch
5588de63f0 Fix logging 2015-06-15 21:04:58 +02:00
mjentsch
006890a29c downscale big stickers
use sticker downscaling to keep readabillity in chats with many stickers
2015-06-04 14:27:49 +02:00
mjentsch
0d62d1bed3 Fix XCode build for adium bundle 2015-06-04 14:27:35 +02:00
mjentsch
1646992349 Set submodule url back to upstream 2015-05-31 17:43:31 +02:00
mjentsch
d5175188e8 Merge branch 'beta2' 2015-05-31 16:34:38 +02:00
mjentsch
a6d75e9593 Update version 2015-05-31 16:01:09 +02:00
mjentsch
e37a0b8cca code style 2015-05-31 15:50:46 +02:00
mjentsch
d8379ce127 Update to newest version of libtgl 2015-05-30 15:56:20 +02:00
mjentsch
8c859ad825 Fix bug that caused dropping of group chat messages when leaving the chat window open during reconnect 2015-05-30 15:55:13 +02:00
mjentsch
e7554c739c Add option for disabling sending a message read recipes, and fix some bugs in adium settings menu 2015-05-30 15:52:17 +02:00
mjentsch
0033837210 Add Makefile.tgl to Xcode project 2015-05-30 11:30:56 +02:00
mjentsch
cec3bf098d Do not include unused net and timer objects in tgl 2015-05-29 19:47:29 +02:00
mjentsch
0065e6d1a9 Fix compile error 2015-05-29 19:04:49 +02:00
mjentsch
49cc80f8c0 Support two factor authentication 2015-05-29 18:25:55 +02:00
mjentsch
0bcbb272ee Don't require manual compiling of libtgl.a before building the Adium bundle 2015-05-27 21:51:08 +02:00
mjentsch
f092273bf6 Fix displaying messages send from other sessions 2015-05-25 22:36:30 +02:00
mjentsch
bad92d3bd6 Fix segfault when receiving images as documents 2015-05-24 14:56:59 +02:00
mjentsch
82b36060b8 Fix progress of receiving file transfers in Adium
Set the xfer before requesting the xfer from the user, as this is the only time when Adium sets the xfer size in its controller class.
2015-05-24 14:55:26 +02:00
mjentsch
b5fb8df3b7 rename key visualization function 2015-05-24 00:23:28 +02:00
mjentsch
c3abf27376 Add support for displaying stickers in chats 2015-05-24 00:22:31 +02:00
mjentsch
899f6bf167 Include segfault-fix in libtgl 2015-05-23 03:10:58 +02:00
mjentsch
efb0f56598 improve secret chat error handling for unsupported features 2015-05-23 03:10:34 +02:00
mjentsch
74f6b6e2f7 Improve support for receiving pictures in secret chats 2015-05-23 03:10:08 +02:00
mjentsch
87ae72a739 cleanup 2015-05-23 03:08:11 +02:00
mjentsch
e022b46ea0 Determine automatic filename, in case caption is missing 2015-05-23 03:07:44 +02:00
mjentsch
aec0cda21b Fix broken secret chats after reload 2015-05-23 02:06:40 +02:00
mjentsch
b415bbd3b4 Update to libtgl v2 2015-05-23 00:18:26 +02:00
mjentsch
6614c25cbc Add workaround for telepathy haze
Use home directory for storing configs, in case purple settings are in a tmp directory
2015-05-02 14:28:49 +02:00
mjentsch
6e501a2a56 Add RPM packaging spec 2015-04-07 22:45:16 +02:00
mjentsch
14e5e106b7 Don't drop secret chat state updates 2015-04-06 16:43:10 +02:00
mjentsch
65f8c4aa6e Handle DC updates during authentication 2015-04-06 16:37:01 +02:00
mjentsch
e0d1f77a79 cleanup 2015-04-05 00:38:22 +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
8a678f98cc Coding style 2015-04-02 22:27:23 +02:00
mjentsch
43266f4a0f Fix adium account settings view 2015-03-28 12:33:29 +01:00
mjentsch
1573309875 Fix retrieval threshold unlimited 2015-03-28 12:22:19 +01:00
mjentsch
13cf093ab1 Update README 2015-03-21 23:54:08 +01:00
mjentsch
fdd05f19b1 Update version 2015-03-21 18:32:41 +01:00
mjentsch
c6669a508d Don't display "empty chat" messages, created confusing output in a few cases. 2015-03-21 17:25:48 +01:00
mjentsch
517604a2b4 Small fixes 2015-03-21 00:56:32 +01:00
mjentsch
5463090d48 Fix naming inconsitency 2015-03-20 18:21:52 +01:00
mjentsch
95db4f42a0 Include file transfer filename fix in tgl submodule 2015-03-20 18:18:00 +01:00
mjentsch
a8314eb3ae Only display chats the user is currently member of in chat the "join chat" view 2015-03-20 17:48:54 +01:00
mjentsch
293c6049a6 Display warning when opening a chat the current user is no longer a member of 2015-03-20 17:47:22 +01:00
mjentsch
0664c5b2fe Clean up inconsitencies in prpl tgl data type wrapper functions 2015-03-20 17:45:21 +01:00
mjentsch
f98ec356ba List all existing group chats in the chat join view 2015-03-20 15:48:15 +01:00
mjentsch
9838eb7b85 Add basic chat join view for the Adium Plugin 2015-03-18 22:33:26 +01:00
mjentsch
a0700adeb0 Fix segfault on chat join in Pidgin 2015-03-15 15:59:27 +01:00
mjentsch
4382e1d779 Add custom preferences views for the Adium plugin 2015-03-15 15:56:57 +01:00
mjentsch
5a6b08f60f cleanup
reorder a few functions
2015-03-13 19:47:41 +01:00
mjentsch
7e03ff6e1b Remove naming incosistency 2015-03-13 18:40:28 +01:00
mjentsch
9317fa0f17 Add basic support for read notifications
Add option to enable read notifications in chats and display read notifications as sytem messages.
2015-03-13 18:38:35 +01:00
mjentsch
a480867d99 Remove obsolete purge command
Purge command stopped working when telegram state file path was changed a few commits earlier.
2015-03-13 16:58:39 +01:00
mjentsch
9c1628e18f Remove unused callbacks 2015-03-13 16:57:43 +01:00
mjentsch
7903ce1811 Fix user online/offline status
Fix bug that prevented users from being displayed as online. Add option to set inactive users offline after a certain amount of days. Clean up user status code.
2015-03-13 16:57:08 +01:00
mjentsch
0590862151 Add support for file transfers in encrypted chats 2015-03-13 00:18:01 +01:00
mjentsch
077edc19d5 Repository cleanup and coding guidelines 2015-03-13 00:17:35 +01:00
mjentsch
c375ed1df0 Support for history retrieval threshold
Include option to define the maximum amount of days, for which the history should be fetched. Introduce 14 days as default, to reduce performance issues or crashes when the user hasn't been using telegram-purple for a long time.
2015-03-13 00:16:26 +01:00
mjentsch
b67c4115ff Repository cleanup and housekeeping 2015-03-12 01:56:16 +01:00
mjentsch
1b7dd971d8 Don't segfault when transfer filename is not set 2015-03-12 01:39:48 +01:00
mjentsch
a0b873933a Remove colors from messagelog 2015-03-12 01:39:03 +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
95258c940b Handle message size properly
Split oversized messages into chunks in case they are too big and make max amount of chunks configurable in settings.
2015-03-10 16:23:43 +01:00
mjentsch
249588a49d Handle missing public key more gracefully
Don't crash pidgin and display an error message when no public key is not found.
2015-03-10 02:01:42 +01:00
mjentsch
cd8085ce5a Use purple configuration directory for storing telegram state files 2015-03-09 16:03:10 +01:00
mjentsch
489535fbd4 Add DC hotfix in submodule 2015-03-09 15:44:16 +01:00
mjentsch
2d94194d45 Fix segfault on automatic chat join
Check if peer was already allocated in chat_show. The auto-join flag can be safely ignored, all incoming chat messages are added to the chat anyways and will trigger an opening of the chat.
2015-03-07 16:21:26 +01:00
mjentsch
c994730f3e Add hotfix number to Adium version 2015-03-05 00:58:57 +01:00
mjentsch
fffe7519d7 Don't drop HTML markup in Adium 2015-03-05 00:57:36 +01:00
mjentsch
8548576651 Fix file permissions again
Directories need to be executable for opening.
2015-03-04 23:32:29 +01:00
mjentsch
9cddd63f96 Clean up repository 2015-03-04 23:17:23 +01:00
mjentsch
81ab5bf1f3 Fix install script on all plattforms
Creating missing directories when installing regular files is not supported on BSD install.
2015-03-04 23:16:03 +01:00
mjentsch
0cc28ecea6 Fix configuration script 2015-03-04 23:05:02 +01:00
mjentsch
97c393db4b Update version to 0.7.0 and make changelog a Mardown 2015-03-04 22:38:58 +01:00
mjentsch
deaa659895 Fix segfault in file transfer memory management 2015-03-04 22:37:59 +01:00
mjentsch
39c9d6d5b4 Fix file transfer progress in Adium
Set sent bytes to file size manually, since Adium won't do it automatically and also wont display the file transfer as completed as a result.
2015-02-28 15:44:59 +01:00
mjentsch
9fca523161 Implement file transfer in Adium Plugin
Implement file transfer protocol in Plugin and fix a few things that stopped old file handling from working with Adium.
2015-02-25 22:53:28 +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
mj
8fec18e8c4 Merge pull request #43 from flyvint/master
Fix install
2015-02-04 19:06:12 +01:00
vint
832b56c4e7 Fix install 2015-02-04 18:42:42 +03:00
mjentsch
3ccd738d5c Update CHANGELOG 2015-01-30 19:47:43 +01:00
mjentsch
c3445be62f Fix debug logging linebreaks 2015-01-30 01:08:00 +01:00
mjentsch
bf511c94af Display an extra alert when the connection fails 2015-01-29 01:03:19 +01:00
mjentsch
7ffe2694cc Use pull-request branch temporarily 2015-01-29 00:21:49 +01:00
mjentsch
e545057039 Fix outgoing image messages 2015-01-28 20:05:08 +01:00
mjentsch
bb29ee82bc Rather just change this than fiddling around with c standards in the makefile 2015-01-28 19:43:42 +01:00
mjentsch
f6570914a6 Fix framework include paths in XCode
If you are compiling the Adium plugin with XCode yourself, this will break your Project and you will have move all frameworks into telegram-adium/Frameworks/Adium (sorry about that)
2015-01-28 19:07:10 +01:00
mjentsch
3b940fca1d Fix outgoing messages for Adium and old libpurple versions 2015-01-28 18:51:07 +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
2ec44834fc Fix bugs in makefile
Remove -D from install script, since its not supported in all versions. Libpurple has created all of those directories, and if they do not exist, there is a different problem so cancelling those installation should be a good thing.
2015-01-26 23:06:04 +01:00
mjentsch
73913b3a2c Fix Adium incoming group chat message problem 2015-01-26 19:01:18 +01:00
mjentsch
e938132721 Clean up and fix coding style 2015-01-25 22:49:46 +01:00
mjentsch
45bd244593 Update to 0.6.1 to and handle version in autoconf 2015-01-25 22:43:43 +01:00
mjentsch
aa28f37d37 Fix Makefile.in on OSX
Include DEFS generated by configure into makefile.
2015-01-25 21:25:27 +01:00
mjentsch
adc429beb4 Fix coding style and remove old commented-out code 2015-01-23 20:56:50 +01:00
mjentsch
2f44ea928f Fix memory leak 2015-01-23 20:47:23 +01:00
mjentsch
048ef56eee Remove username normalization
We don't have one unified username format, it can be a name, a phone number or a user id. Therefore we can't put it into a unified format without eventually breaking things.
2015-01-23 20:42:20 +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
3f70192cd3 Sleeker README, move changelog to separate file 2015-01-22 01:21:31 +01:00
mjentsch
ac9ce29b1d Fix user info and clean up source code 2015-01-22 00:16:35 +01:00
mjentsch
58f34cbe8a Merge branch 'fix-centos' 2015-01-20 00:45:32 +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
977947a357 Revert "Respect destdir in public key path"
This reverts commit 5985d08fc5.
2015-01-19 23:26:02 +01:00
mjentsch
8f136c2aa6 Merge branch 'master' into fix-centos 2015-01-19 22:47:39 +01:00
mjentsch
97257f5d32 Fix submodule makefiles 2015-01-16 16:29:17 +01:00
mjentsch
f90f812f2b Fix compiler warnings 2015-01-16 12:39:04 +01:00
mjentsch
871a06a5bd fix makefile for tgl 2015-01-16 12:38:44 +01:00
mjentsch
96821b8d67 Add release scheme for XCode project 2015-01-16 10:57:59 +01:00
mjentsch
dbd7d5638b Add better input validation for phone number 2015-01-16 10:38:16 +01:00
mjentsch
ae4b0fc92b Fix search path in xcode project 2015-01-15 22:07:10 +01:00
mjentsch
ab61a44c17 Update used version of tgl 2015-01-15 21:49:36 +01:00
mjentsch
a08a267e22 fix compat. with centos 2015-01-13 22:10:31 +01:00
mjentsch
5985d08fc5 Respect destdir in public key path 2015-01-11 00:39:10 +01:00
mj
87fad25bde Merge pull request #29 from acran/master
Bugfix: always respect $(DESTDIR) in Makefile
2015-01-11 00:36:33 +01:00
mjentsch
9dc697059d Change README 2015-01-10 14:26:36 +01:00
mjentsch
0ad955688c Update TODO list 2015-01-10 12:54:53 +01:00
mjentsch
498eebba6d Move installation instructions to top 2015-01-10 12:15:27 +01:00
mjentsch
a1feffc841 Change README 2015-01-10 12:11:03 +01:00
mjentsch
7353fdcf5c Change README 2015-01-10 11:40:41 +01:00
mjentsch
b2627d9d5c Display stub messages for unimplemented methods and clean up unused code 2015-01-10 11:07:01 +01:00
mjentsch
26743c55a8 update version in xcode project 2015-01-10 00:15:23 +01:00
mjentsch
c02fc83879 Update Version 2015-01-09 20:05:01 +01:00
mjentsch
36744dbf7f Display notification on pending secret chats 2015-01-09 18:09:28 +01:00
mjentsch
5553de65f6 Remove exponential timeouts to prevent segfaults
Do not create the reconnection timeout, since we don't use it anymore and it caused segfaults.
2015-01-09 11:56:03 +01:00
mjentsch
cb9d744d57 Add missing files to XCode project. 2015-01-09 11:34:40 +01:00
mjentsch
376a1165af Use newest version of tgl 2015-01-07 23:25:08 +01:00
mjentsch
9e072f0ebb Some cosmetic changes and code cleanup 2015-01-07 22:50:53 +01:00
mjentsch
4bf90fc333 Do not automatically accept secret chats
Allow the user to decide if a secret chat should be handled by Pidgin. Add options
to set default behavior for secret chets.
2015-01-07 22:28:36 +01:00
mjentsch
a0981c0abb Coding style 2015-01-07 16:54:56 +01:00
mjentsch
e8f30f2284 Handle secret chat deletions 2015-01-07 16:54:35 +01:00
root
97c3ff894a Added basic user info to encrypted user 2015-01-06 18:30:03 +01:00
mjentsch
ed47a16de1 Fix get_info for encrypted chats 2015-01-04 15:29:41 +01:00
mjentsch
0e9b0606b9 Create extra directories for lodepng in build output 2015-01-04 15:14:17 +01:00
mjentsch
34b026dc34 Handle user name formatting in tgl callback 2015-01-04 12:37:23 +01:00
mjentsch
1dda956166 Support secret chats
Load and store secret chats in a file, handle secret chat updates, visualize fingerprint in settings
2015-01-04 12:36:13 +01:00
mjentsch
0c718206d7 Move lodepng into separate folder 2015-01-02 22:03:47 +01:00
mjentsch
f834b7cd38 Fix memory leak 2015-01-02 19:55:43 +01:00
mjentsch
817ab52aae Merge branch 'master' into support-secret-chats
Conflicts:
	Makefile.in
	telegram-base.c
	telegram-base.h
	telegram-purple.c
	telegram-purple.h
2015-01-02 14:29:42 +01:00
mjentsch
8881011fac Move key visualization function into base functions 2015-01-02 14:12:52 +01:00
mjentsch
4dba56db58 Remove unused functions for adding/removing multiple buddies
Libpurple will automatically iterate the list of buddies and call purple_add_buddy for each entrie
if those functions are missing.
2015-01-02 13:51:48 +01:00
mjentsch
106f828b9e Mark chat messages as read 2015-01-02 12:54:41 +01:00
mjentsch
4a4179d262 Fix group-message sending in Adium 2015-01-01 18:02:14 +01:00
mjentsch
9d61f6815b Remove duplicate user alias change handling 2015-01-01 17:27:05 +01:00
mjentsch
c1ab317f1b Error connection instead of reconnecting
Reconnection attempts are expected to be handled by libpurple and not by the protocol plugin, so it is visible to the user when the connection is not working.
2014-12-31 16:17:11 +01:00
mjentsch
94b4390c8c Add new files to Makefile 2014-12-28 00:23:35 +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
e3caa6acdb Remove unused functions and add some comments 2014-12-26 19:19:29 +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
markus
2f752c7fd5 added secret chat buddy option 2014-12-24 12:20:01 +01:00
mjentsch
4fa2b91eaa Mark messages as read
Send a mark_read command for each received message as soon as the user is available.
2014-12-24 02:44:10 +01:00
root
2937140a07 added lodepng lib and function to genearte image from hashkey 2014-12-19 13:57:20 +01:00
mjentsch
91b8cb5bb1 Add proper error handling for login phase 2014-12-19 11:22:24 +01:00
mjentsch
b2c26771b5 Fix segmentation fault on chat creation update
Check for null-pointer before passing hash table content to strcmp
2014-12-13 16:09:09 +01:00
Roman Anasal
17065ba1cb Bugfix: always respect $(DESTDIR) in Makefile 2014-12-10 12:42:44 +01:00
mj
f1549804a5 Merge pull request #22 from malishev/better-icons
Better icons
2014-11-30 13:29:41 +01:00
vvaltman
68d69e1da8 Use latest version of tgl 2014-11-27 21:53:21 +03:00
vvaltman
433a96a9d1 Show outgoing messages 2014-11-27 17:33:17 +03:00
mjentsch
8dcc2a55f7 Update README 2014-11-26 15:11:05 +01:00
mjentsch
69360b4f57 Implement better fallback mode in case requests is missing
Open a dummy chat to query the user for the entered SMS code
2014-11-26 12:32:19 +01:00
mjentsch
62909f9c83 Implement better fallback behavior if requests.h is missing
When compat-mode is activated or purple_request does not return a valid handle, open a new conversation and query the user for the SMS code.
2014-11-26 09:30:43 +01:00
mjentsch
c934f5742b Merge branch 'master' of https://github.com/majn/telegram-purple into support-secret-chats 2014-11-26 09:26:02 +01:00
Yuri
d30dfb047a Better icons 2014-11-24 23:01:58 +03:00
Vysheng
50c52b091c Fixed -lrt check 2014-11-24 20:37:10 +03:00
vvaltman
674a2935cf Makefile.in: deleted -m64 option 2014-11-24 19:42:31 +03:00
mjentsch
82b11fffa3 Fix argument types in secret chat update callback 2014-11-24 13:34:00 +01:00
mjentsch
04e8c3e0cd Add stubs for handling updates of secret chats 2014-11-24 13:26:00 +01:00
mjentsch
8bd58265fd Update plugin description version 2014-11-24 12:51:14 +01:00
mjentsch
d0b318ee21 Don't display own messages twice in Pidgin 2014-11-24 09:26:57 +01:00
mjentsch
33c49321fd Fix potential segfault 2014-11-24 01:35:55 +01:00
mjentsch
5327b8825b Remove outdated stuff from README 2014-11-24 01:26:30 +01:00
mjentsch
4fa71f579b Remove duplicated code 2014-11-24 01:04:31 +01:00
mjentsch
653d8a8f2d Update README 2014-11-24 00:58:53 +01:00
mjentsch
9062ee8b46 Add vysheng to authors 2014-11-24 00:26:07 +01:00
mjentsch
7709f2fd3d Merge branch 'master' into tgl-test 2014-11-24 00:03:36 +01:00
mjentsch
a7f4669982 Update README 2014-11-23 23:54:06 +01:00
mjentsch
0a759867e2 Print service messages 2014-11-23 23:43:39 +01:00
mjentsch
20278e3c26 Support adding new contacts 2014-11-23 21:18:13 +01:00
mjentsch
b926b4d266 Respect user and chat updates during runtime
Update chat and user properties, update user profile photos, delete users and chats
2014-11-23 19:52:08 +01:00
mjentsch
3e7be633eb Do not add our own messages to chats to prevent them from showing up twice 2014-11-23 00:27:44 +01:00
mjentsch
c847bce557 Make: link libraries after including objects in linker step
Including libraries before the objectse will result in improperly linked OpenSSL library (see issue #3)
2014-11-22 22:39:33 +01:00
vvaltman
75251d9379 Send typing notifications 2014-11-22 18:17:47 +03:00
vvaltman
10ca6ccd46 telegram-base: fixed bug in read_state 2014-11-22 17:32:10 +03:00
vvaltman
6e19bc87cf Fixed duplicate free. Escape received messages. Updated to latest tgl 2014-11-21 19:36:48 +03:00
mjentsch
d3c045711e Unescape HTML special chars on outgoing messages 2014-11-21 16:42:53 +01:00
mjentsch
210741de43 Add "image" flag to all picture messages 2014-11-21 16:30:03 +01:00
mjentsch
d755992821 Prevent infinite loop on lost network connection
Increase the timeout exponentially on failed connections to prevent an infinite loop of reconnects.
2014-11-21 16:03:17 +01:00
mjentsch
54f6a29456 Accept conn_failed as valid state on timeouts
When the internet connection is lost, in some cases libpurple can return a file descriptor without any error that is still not writable or readable. In that case, the connection would remain in the state conn_error until the next ping timeout, which has been causing an assertion error until now.
2014-11-21 16:03:17 +01:00
vvaltman
3e4fc8513f Added support for incoming pictures 2014-11-21 17:44:49 +03:00
vvaltman
27206a6f69 Updated to latest version of libtgl 2014-11-18 17:45:19 +03:00
vvaltman
5d19892508 Use correct app_id 2014-11-17 18:24:09 +03:00
Vysheng
3025c63350 small bugfixes 2014-11-17 16:27:01 +03:00
mjentsch
ba177d885a Add compatibility mode to support SMS authentication on clients that can't prompt the user directly
Read the sms code from settings in case compatibility mode is selected or
the purple_request functions do not return a valid code.
2014-11-16 21:55:36 +01:00
mjentsch
2586273f72 Clean up README and license headers 2014-11-16 20:41:03 +01:00
mjentsch
e3e8fb7984 Clean up repository
Remove outdated comments, refactor function names, conform to coding guidelines
2014-11-16 20:39:10 +01:00
mjentsch
ef23a1b589 Fix coding guidelines 2014-11-16 17:56:55 +01:00
mjentsch
22a37c3894 Wrap purple functions for use with libtgl types 2014-11-16 16:33:27 +01:00
mjentsch
6cdd435ace Fix README installation guide pictures 2014-11-15 18:02:21 +01:00
mjentsch
fad61cb3d8 Fix readme (again) 2014-11-15 17:58:41 +01:00
mjentsch
bc110cde96 Fix download link 2014-11-15 17:53:34 +01:00
mjentsch
1cb745aa65 Remove obsolete note about ubuntu build from README 2014-11-15 01:26:28 +01:00
mjentsch
2f788edd99 Adapt telegram-adium to changes in submodule path 2014-11-15 01:24:20 +01:00
mjentsch
363c170550 Free read-event properly in tgln_free 2014-11-15 01:14:29 +01:00
mjentsch
6a401eb4bd Fix Adium plugin 2014-11-13 00:45:51 +01:00
vvaltman
b82f391749 Fixed README 2014-11-13 01:58:03 +03:00
vvaltman
6a36be8b10 Deleted Makefile 2014-11-13 01:56:15 +03:00
Vysheng
8bdf22648d Merge branch 'tgl-test' of github.com:majn/telegram-purple into tgl-test
Conflicts:
	.gitignore
	Makefile
	telegram-base.c
	telegram-purple.c
2014-11-12 21:37:09 +03:00
Vysheng
5b4f1cd450 Updated to use subdirectory. Fixed buffer overflow in date format 2014-11-12 21:23:01 +03:00
Vysheng
8ebbdfbaff updated .gitignore 2014-11-11 20:38:01 +03:00
Vysheng
f46c685bbd Rewritten to use libtgl 2014-11-11 20:29:09 +03:00
Vysheng
0894c093a5 Added missing files 2014-11-11 20:24:30 +03:00
Vysheng
8f69d8d11d Slightly working version 2014-11-11 20:21:14 +03:00
mjentsch
1b6fdf44e8 Fix link to Adium bundle for 0.3.3 2014-11-05 21:52:18 +01:00
mjentsch
560b55b299 Don't print debug messages in unused functions 2014-10-31 20:37:30 +01:00
mjentsch
bd4bc51651 Fix library includes in linker step 2014-10-28 01:20:30 +01:00
mjentsch
a9a48fff90 Update version to 0.3.3 2014-10-14 22:29:22 +02:00
mjentsch
c54ebf5c17 Error the telegram-plugin on failed connections, so hopefully libpurple will inform the user and restart it once the connectivity is back 2014-10-14 22:15:02 +02:00
mjentsch
b3642e2e7e Remove correct server.pub when uninstalling 2014-10-14 22:08:15 +02:00
mjentsch
91ac1b06ee Remove old printfs of telegram-cli to fix issues on Finch 2014-10-14 22:06:29 +02:00
mjentsch
2b366fe1a8 Fix segfaults on disconnect 2014-10-14 18:59:04 +02:00
mjentsch
d5fb1601b7 cleanup useless comments 2014-10-14 18:53:59 +02:00
mjentsch
4843c4052d Remove linebreaks from user names 2014-10-10 17:28:10 +02:00
mjentsch
61c8735578 Force-free all open connections on close 2014-10-10 17:26:31 +02:00
mjentsch
2bebb7ab62 Display time correctly and don't display empty messages 2014-10-10 17:16:16 +02:00
mjentsch
a8f228cef5 Upgrade to version 0.3.2 2014-10-09 21:31:33 +02:00
mjentsch
531a36fa63 Add comments and logging messages to event listener stubs 2014-10-09 20:26:47 +02:00
mjentsch
8a63df1529 Fix TelegramService settings 2014-10-09 20:21:12 +02:00
mjentsch
d66775cc70 Avoid compiler warnings 2014-10-09 20:20:21 +02:00
mjentsch
b2d3a39fb4 Do not use colors when compiling for production mode
Pidgin and Adium debug logs do not display terminal color codes correctly, avoid that.
2014-10-09 20:13:08 +02:00
mjentsch
531d27ef61 Set Build-Target for Adium Plugin to OSX 10.8 and include AppKit 2014-10-09 20:12:22 +02:00
mjentsch
056d7c7c19 Improve README and update to version 0.3.1 2014-10-06 23:18:45 +02:00
mjentsch
dd27d4f66c Remove unused includes from XCode project 2014-10-06 22:59:18 +02:00
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
290a3251e6 Remove unused code 2014-10-06 22:56:02 +02:00
mjentsch
3773562201 Do not compile on uninstallation 2014-10-05 20:54:24 +02:00
mjentsch
17e925e4ef Add Makefile target "purge" to delete all user data 2014-10-05 20:53:14 +02:00
mjentsch
41b3230a9f Update version and README 2014-10-05 15:38:31 +02:00
mjentsch
bfb663088d Don't include libcrypto in working tree 2014-10-05 15:34:51 +02:00
mjentsch
535c0f645e Merge branch 'adium-plugin' 2014-10-05 14:46:35 +02:00
mjentsch
ac266fb1f5 Set "Release" build as default in XCode Project 2014-10-05 14:19:40 +02:00
mjentsch
8eacac2b87 Load public key from Adium bundle 2014-10-05 14:19:05 +02:00
mjentsch
b48e1b240e Use mobile-state instead of unavailable, to ensure proper display in Adium 2014-10-05 12:29:15 +02:00
mjentsch
4b7b1e0010 Fix includes and remove obsolete code 2014-10-05 12:25:23 +02:00
mjentsch
feff8675db Add missing license to adium plugin 2014-10-05 12:21:29 +02:00
mjentsch
cc03e5d059 Update adium wrapper settings 2014-10-05 12:19:15 +02:00
mjentsch
8bc8d2477e Deploy bundle on run 2014-10-05 00:24:41 +02:00
mjentsch
b6c9515de4 Rename struct user to a avoid name collisions 2014-10-05 00:12:31 +02:00
mjentsch
114bce7d45 Fix dependencies and build settings in XCode project 2014-10-05 00:09:33 +02:00
mjentsch
b5e242ea40 Do not include framework files 2014-10-04 23:42:08 +02:00
mjentsch
922fe0e090 Do not use Macros to represent Booleans 2014-10-04 20:36:54 +02:00
mjentsch
c5d7fdb89c Fix build process by adjusting search path and adding missing libraries
Add openssl and libz, don't warn about deprecated functions and add purple and glib to the search path so we don't need to change the includes in our other files
2014-10-04 20:36:54 +02:00
mjentsch
de82654434 Ignore more XCode userdata 2014-10-04 20:36:54 +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
f58302be5e Ignore XCode xcuserstate file and remove it from cache 2014-10-04 20:33:28 +02:00
mjentsch
d3d8903b49 Add a nicer description 2014-10-04 20:32:59 +02:00
mjentsch
706a28a4e6 Add xCode project files for an Adium telegram plugin 2014-10-04 20:32:59 +02:00
mjentsch
cc09ab19e0 Fix errors in README 2014-10-04 12:19:43 +02:00
mjentsch
da8ff5782c Move Ubuntu note to Debian 2014-10-03 18:50:09 +02:00
mjentsch
cf1bd23762 Add manual for installing Emojis 2014-10-03 18:42:25 +02:00
mjentsch
83c09aeed3 Remove useless protocoll options 2014-10-03 18:24:16 +02:00
mjentsch
84e549fc96 Use correct DC number for our updated application configuration 2014-10-03 18:21:20 +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
1082e4d18a Add install instruction for openSuse 2014-10-02 23:10:45 +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
4f711c16d7 Update README 2014-10-02 17:11:42 +02:00
mjentsch
30f6f0d381 Add makefile 2014-10-02 14:17:36 +02:00
mjentsch
a7f0b16599 Remove automake 2014-10-02 13:56:29 +02:00
mjentsch
97c8b37121 Do not use old tg-cli directory for storing files 2014-10-02 13:30:44 +02:00
mjentsch
d4eff42a42 Use our own application configuration 2014-10-02 13:29:54 +02:00
mjentsch
3fa72a9d42 Remove unused binlog functions 2014-10-02 13:01:28 +02:00
mjentsch
89ddae23ef Restart ping-timer on read 2014-10-02 12:49:46 +02:00
mjentsch
7c69af9b00 Remove unused code 2014-10-02 12:46:19 +02:00
mjentsch
1954cb0d63 Add hotfix for "new group message"-infinite loop 2014-10-02 12:31:17 +02:00
mjentsch
5c488f9c8d Support downloads from foreign DCs 2014-10-02 12:29:02 +02:00
mjentsch
d6530b69bb Don't show info window on first user load 2014-09-21 22:30:50 +02:00
mjentsch
a6013016f1 Ensure that download directory exists 2014-09-21 00:11:07 +02:00
Christopher Althaus
164620f65d Add show user icons in buddy list 2014-09-20 23:20:14 +02:00
mjentsch
8919d2c3ec Improve README 2014-09-20 18:39:13 +02:00
mjentsch
52058a52e3 Fix errors in README 2014-09-20 18:18:34 +02:00
mjentsch
90bed1ef61 Provide english readme file and update build instructions 2014-09-20 18:13:46 +02:00
mjentsch
55949d8d92 Update build tool dependencies and add a new configure 2014-09-20 18:13:02 +02:00
mjentsch
81e9eed71f Ignore core dumps 2014-09-20 18:12:00 +02:00
mjentsch
73f44ffe0b Remove non-working checks for glib and libpurple (for now) and generate a new configure 2014-09-20 16:57:50 +02:00
mjentsch
92a57d18bb Don't check for libreadline and but check for glib and libpurple in configure 2014-09-20 16:24:43 +02:00
mjentsch
cd8866c4e2 Remove unused includes of libreadline 2014-09-20 16:23:39 +02:00
mjentsch
7fa1600e0b Add log output for received message types 2014-09-20 10:04:40 +02:00
mjentsch
c1f170467c Flush connection after execiton of timer function 2014-09-20 10:02:49 +02:00
mjentsch
4c358b6962 Don't open multiple chats when multiple messages arrive while a chat is still not joined 2014-09-19 18:22:11 +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
Matthias Jentsch
703d6e9e2e Remove overlooked merge leftovers 2014-09-10 16:23:44 +02:00
mjentsch
1f7f768bb5 Merge branch 'master' of bitbucket.org:telegrampurple/telegram-purple
Conflicts:
	purple-plugin/telegram-purple.c
2014-09-09 19:14:28 +02:00
mjentsch
07a0766948 Fix sending and receiving of messages in group chats
Add received messages to correct group chat, open closed chats on received messages, display our name correctly, handle messages from ourself correctly.
2014-09-08 23:10:25 +02:00
mjentsch
00944910bc Remove pinging 2014-09-08 23:09:55 +02:00
mjentsch
7d8ec1ef42 Add missing message allocated handlers 2014-09-08 23:09:20 +02:00
Christopher Althaus
9d23ecac7f Added group chat functions 2014-09-07 21:44:37 +02:00
mjentsch
956a034be1 Add group chats 2014-09-07 20:56:44 +02:00
mjentsch
709b7f2cdb Use current home for config instead of a static directory 2014-09-07 13:48:25 +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
40485fabdc Remove unused code 2014-09-05 21:23:22 +02:00
mjentsch
a05b3b8405 fix typo 2014-09-05 21:19:37 +02:00
mjentsch
4f33201d09 Don't leak data center list when closing down telegram 2014-09-04 22:07:25 +02:00
mjentsch
a7bb59a13a move message store size into telegram.h 2014-09-01 22:25:02 +02:00
mjentsch
178583cd72 Clean up whitespaces and ugly code 2014-09-01 22:23:59 +02:00
mjentsch
f39eaa5f99 Fix telegram-purple functions that broke when removing globals 2014-09-01 22:21:45 +02:00
mjentsch
305253b3f6 Add a few comments 2014-09-01 22:17:42 +02:00
mjentsch
0aa8a9de15 Remove "_network" from telegram connect function 2014-09-01 22:14:40 +02:00
mjentsch
fa457a6900 Clean up out-commented code 2014-09-01 21:59:23 +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
mjentsch
2e50ec47b7 Merge user-status 2014-08-23 17:36:52 +02:00
mjentsch
6706ac14cb Merge branch 'States' 2014-08-23 16:42:14 +02:00
Christopher Althaus
6441c6be4b Fixed telegram notification client bug 2014-08-23 16:40:30 +02:00
Christopher Althaus
fa9d45bd20 User State/Typing implemented
Send Messages activated
2014-08-23 16:23:37 +02:00
mjentsch
386abe2ab9 Merge branch 'refactor-telegram-cli' 2014-08-23 13:03:55 +02:00
mjentsch
5a425be62f Remove unused code and build files 2014-08-23 12:57:38 +02:00
mjentsch
832cf949f0 Fix message allocation 2014-08-23 11:18:42 +02:00
mjentsch
eec5ea50aa Remove globals containing account and connection from the purple plugin to enable multiple connections 2014-08-23 02:56:47 +02:00
mjentsch
dddbe451c1 fix a bug in the configuration writer
creates new configuration files readable and writable
2014-08-23 02:55:13 +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
d062ec44d0 Switch to ready-state when the data center is already registered 2014-08-23 02:41:26 +02:00
mjentsch
a4e5449d5a Move telegram callbacks and settings into configuration struct 2014-08-23 02:40:10 +02:00
mjentsch
f09b4c1c87 Move config function to avoid predeclaration 2014-08-22 19:02:11 +02:00
mjentsch
c81ce16e80 Fix coding style and add missing docstrings 2014-08-22 18:57:14 +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
5d8d170927 Use allocation utilities from utilites.h and initiate telegram with zeroes 2014-08-22 18:44:23 +02:00
mjentsch
c144484fd5 Add memory management for mtproto_connections
Mark connections for destruction on close and free all allocated memory only once all incoming queries are read, since those queries will still access data on the current mtproto_connection and cause segmentation faults.
2014-08-22 18:41:35 +02:00
mjentsch
1e6598c11c Request proxy connections by callback
Require the user of telegram to provide a callback to create and cleanup proxy connections, to allow
the application to create new connections when needed.
2014-08-22 18:28:58 +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
e667299d2f Add binlog to telegram struct 2014-08-22 17:14:08 +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
331d631659 Ignore gdb files 2014-08-22 16:43:45 +02:00
mjentsch
188f890df5 Ignore app-hash 2014-08-08 08:46:39 +02:00
mjentsch
1170ae5710 Implement state machine for dc discovery and login. 2014-08-08 08:45:58 +02:00
mjentsch
f1a2738783 remove redundant functions from binlog 2014-08-08 08:44:56 +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
67c5a5e712 Ignore ycm-autocompletion files 2014-07-29 15:31:37 +02:00
Matthias Jentsch
9b7f273579 README.md edited online with Bitbucket 2014-07-26 09:11:47 +00: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
43a5a80c48 Set up stub for telegram library 2014-07-11 01:13:01 +02:00
mjentsch
44e9163b66 Remove useless comments 2014-07-11 01:06:37 +02:00
mjentsch
6a439a5d55 Move everything into one Makefile
Avoid having to execute two different make commands to properly build the plugin, when there are changes in the telegram-cli files.
2014-07-08 21:17:50 +02:00
mjentsch
2099d9fbc3 Rename printname to alias 2014-06-27 09:37:35 +02:00
mjentsch
f28d89c9c6 Replace tabs with 4 spaces 2014-06-27 09:35:47 +02:00
mjentsch
6325bd108d Listen to changed users and add new chats to the current sessions 2014-06-22 23:39:05 +02:00
mjentsch
0945a3ca11 Add event handler functionality to tg-cli 2014-06-22 23:38:06 +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
dbf509d59e Log some terminal messages to libpurple log 2014-06-22 23:33:57 +02:00
mjentsch
75e1abe520 Remove useless functions 2014-06-21 01:51:26 +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
mjentsch
90f7b39e11 Fix log format arguments
Remove the misuse of va_list and emulate behavior of purple debugging functions in our own code, since a va_list cannot be passed to purple_debug_info,
2014-06-15 03:22:39 +02:00
mjentsch
93f4bd25ae Add an externally controllable message-log and redirect tg-cli logging to the libpurple logging mechanism 2014-06-09 14:22:06 +02:00
Christopher Althaus
58244abb2d changed login 2014-05-30 10:05:48 +02:00
mjentsch
855c461f35 Debugging changes 2014-05-23 13:42:05 +02:00
mjentsch
cc2a19d6ea Merge branch master of bitbucket.org:telegrampurple/telegram-purple 2014-05-23 11:37:59 +02:00
mjentsch
8b4a1c8d10 Use input values from account settings to authentication to data center 2014-05-23 11:36:54 +02:00
Christopher Althaus
70682ef8b5 Git Kommandos hinzugefügt 2014-05-23 09:49:00 +02:00
mjentsch
377c809ba7 Add options for user verification, refactor header file-name to include functions into the purple-plugin and copy server.pub into the /etc/telegram directory when installing. 2014-05-11 22:18:21 +02:00
mjentsch
da57c79053 Update readme for new build process 2014-05-10 19:58:52 +02:00
mjentsch
02296e3774 Link header files of the telegram cli tool 2014-05-10 19:56:29 +02:00
mjentsch
e0c65b1b8d Move plugin into separate directory 2014-05-10 15:37:43 +02:00
mjentsch
0bc969918a Add files from telegram-purple-skeleton 2014-05-08 13:17:11 +02:00
178 changed files with 22588 additions and 19129 deletions

20
.gitignore vendored
View file

@ -1,9 +1,11 @@
telegram
*.o
Makefile
autom4te.cache
config.h
config.log
config.status
.idea/
nbproject/
/objs/
/autom4te.cache/
/config.h
*~
/dep/
/libs/
/bin/
/config.log
/config.status
/Makefile
/commit.h

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule "tgl"]
path = tgl
branch = test
url = https://github.com/majn/tgl

View file

@ -1,15 +1,48 @@
language: c
compiler:
- gcc
- clang
install:
- sudo apt-get install libconfig8-dev
- sudo apt-get install libreadline6-dev
- sudo apt-get install libssl-dev
- sudo apt-get install liblua5.2-dev lua5.2
# Select Trusty Tahr.
sudo: required
dist: trusty
# Travis' git submodule support is ... broken? half-broken? Maybe intentional?
git:
submodules: false
depth: 3
before_install:
- git submodule update --init --recursive
- sudo apt-get update -qq
- sudo apt-get install -qq libssl-dev libgcrypt20-dev libpurple-dev libwebp-dev
script:
- ./configure
- make
- ./configure $CONFIGURE_FLAGS
- make -j2
- make check
compiler:
- clang
- gcc
env:
# Try to be nice to the builder
- CONFIGURE_FLAGS=""
- CONFIGURE_FLAGS="--disable-gcrypt"
- CONFIGURE_FLAGS=" --disable-libwebp"
# - CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp"
- CONFIGURE_FLAGS=" --disable-translation"
# - CONFIGURE_FLAGS="--disable-gcrypt --disable-translation"
# - CONFIGURE_FLAGS=" --disable-libwebp --disable-translation"
- CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp --disable-translation"
matrix:
# Be even nicer by excluding half of the combinations
exclude:
- compiler: clang
env: CONFIGURE_FLAGS=""
- compiler: gcc
env: CONFIGURE_FLAGS="--disable-gcrypt"
- compiler: clang
env: CONFIGURE_FLAGS=" --disable-libwebp"
# - compiler: XXX
# env: CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp"
- compiler: gcc
env: CONFIGURE_FLAGS=" --disable-translation"
# - compiler: clang
# env: CONFIGURE_FLAGS="--disable-gcrypt --disable-translation"
# - compiler: gcc
# env: CONFIGURE_FLAGS=" --disable-libwebp --disable-translation"
- compiler: clang
env: CONFIGURE_FLAGS="--disable-gcrypt --disable-libwebp --disable-translation"

4
AUTHORS Normal file
View file

@ -0,0 +1,4 @@
Matthias Jentsch <mtthsjntsch@gmail.com>
Ben Wiederhake <Ben.Wiederhake@gmail.com>
Vitaly Valtman <vvaltman@aurum>
Christopher Althaus <althaus.christopher@gmail.com>

45
AppStream/Makefile Normal file
View file

@ -0,0 +1,45 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Ben Wiederhake 2016
# This file is NOT meant for inclusion into the main Makefile.
LOCALES=$(shell cat po/LINGUAS)
LOCALE_MOS=$(addprefix po/,$(addsuffix .mo,$(LOCALES)))
# Hardcoded, since this should only be run on very few machines anyway,
# which are expected to have msgfmt on their $PATH
MSGFMT_PATH=msgfmt
all: translate
po/%.mo: po/%.po
${MSGFMT_PATH} -cf -o $@ $<
po/telegram-purple.metainfo.xml.pot: telegram-purple.metainfo.untranslated.xml as-metainfo.its
itstool -i as-metainfo.its -o $@ $<
# CAREFUL WHEN EDITING!
# "-j raw.xml *.mo" must be the last options!
telegram-purple.metainfo.xml: as-metainfo.its telegram-purple.metainfo.untranslated.xml $(LOCALE_MOS) po/LINGUAS
itstool -i as-metainfo.its -o $@ \
-j telegram-purple.metainfo.untranslated.xml $(LOCALE_MOS)
.PHONY: potfile
potfile: po/telegram-purple.metainfo.xml.pot
.PHONY: translate
translate: telegram-purple.metainfo.xml

23
AppStream/as-metainfo.its Normal file
View file

@ -0,0 +1,23 @@
<!-- Copyright © 2012-2015 Matthias Klumpp.
This material may only be distributed subject to the terms and
conditions set forth in the GNU Free Documentation License (GFDL),
V1.2 with no invariant sections or later (the latest version is
presently available at http://www.gnu.org/licenses/fdl.txt).
This file bases on the "Quickstart Translation using itstool":
http://www.freedesktop.org/software/appstream/docs/sect-Quickstart-Translation.html
The copyright for the base transformer was found at:
http://www.freedesktop.org/software/appstream/docs/index.html
-->
<its:rules
xmlns:its="http://www.w3.org/2005/11/its"
version="1.0">
<its:translateRule translate="no" selector="/component"/>
<its:translateRule translate="yes"
selector="/component/name |
/component/summary |
/component/description |
/component/screenshots/screenshot/caption |
/component/developer_name"/>
</its:rules>

1
AppStream/po/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/*.mo

12
AppStream/po/LINGUAS Normal file
View file

@ -0,0 +1,12 @@
bg
cs_CZ
de_DE
es
es_AR
fr
it_IT
nl
pl_PL
ru_RU
sq
uk

25
AppStream/po/bg.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Любомир Василев, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-10-19 14:07+0000\n"
"Last-Translator: Любомир Василев\n"
"Language-Team: Bulgarian (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Добавка, която добавя поддръжка на Telegram"

25
AppStream/po/cs_CZ.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Jan Breuer <j123b567@jaybee.cz>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-02-18 14:45+0000\n"
"Last-Translator: Jan Breuer <j123b567@jaybee.cz>\n"
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/cs_CZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs_CZ\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Zásuvný modul, který přidá podporu pro Telegram"

25
AppStream/po/de_DE.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Ben Wiederhake <BenWiederhake.GitHub@gmx.de>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-01-09 13:14+0000\n"
"Last-Translator: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>\n"
"Language-Team: German (Germany) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/de_DE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Plugin zur Unterstützung von Telegram"

25
AppStream/po/es.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# aguador <aguador@openmailbox.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2017-02-27 09:08+0000\n"
"Last-Translator: aguador <aguador@openmailbox.org>\n"
"Language-Team: Spanish (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Un plugin que añade soporte para Telegram"

25
AppStream/po/es_AR.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# KNTRO <kntro@msn.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-10-08 19:37+0000\n"
"Last-Translator: KNTRO <kntro@msn.com>\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/es_AR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es_AR\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Un plugin que agrega soporte para Telegram"

25
AppStream/po/fr.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Javier Sixto, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-04-14 19:51+0000\n"
"Last-Translator: Javier Sixto\n"
"Language-Team: French (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Une extension qui ajoute le support pour Telegram"

25
AppStream/po/it_IT.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Giuseppe Pignataro (Fasbyte01) <rogepix@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2017-02-27 09:08+0000\n"
"Last-Translator: Giuseppe Pignataro (Fasbyte01) <rogepix@gmail.com>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/it_IT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Un plugin che aggiunge il supporto per Telegram"

25
AppStream/po/nl.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# justin [notsupplied] <inactive+justin50@transifex.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-10-19 17:56+0000\n"
"Last-Translator: justin [notsupplied] <inactive+justin50@transifex.com>\n"
"Language-Team: Dutch (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Een plug-in die ondersteuning voor Telegram toevoegt"

25
AppStream/po/pl_PL.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Piotr Drąg <piotrdrag@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2017-02-27 09:08+0000\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish (Poland) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/pl_PL/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl_PL\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Wtyczka dodająca obsługę protokołu Telegram"

25
AppStream/po/ru_RU.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Vladimir <TurbaVladimir@yandex.ru>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-02-18 14:45+0000\n"
"Last-Translator: Vladimir <TurbaVladimir@yandex.ru>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Плагин, добавляющий поддержку Telegram"

25
AppStream/po/sq.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Besnik <besnik@programeshqip.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2016-02-18 14:45+0000\n"
"Last-Translator: Besnik <besnik@programeshqip.org>\n"
"Language-Team: Albanian (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/sq/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sq\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Telegram"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Një shtojcë që shton mbulim për Telegram-in"

View file

@ -0,0 +1,21 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr ""
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr ""

25
AppStream/po/uk.po Normal file
View file

@ -0,0 +1,25 @@
#
# Translators:
# Самохвалов Антон <samant.ua@mail.ru>, 2017
msgid ""
msgstr ""
"Project-Id-Version: telegram-purple\n"
"POT-Creation-Date: 2016-01-07 23:23+0100\n"
"PO-Revision-Date: 2017-03-04 06:36+0000\n"
"Last-Translator: Самохвалов Антон <samant.ua@mail.ru>\n"
"Language-Team: Ukrainian (http://www.transifex.com/telegram-purple-developers/telegram-purple/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#. (itstool) path: component/name
#: telegram-purple.metainfo.untranslated.xml:9
msgid "Telegram"
msgstr "Телеграм"
#. (itstool) path: component/summary
#: telegram-purple.metainfo.untranslated.xml:10
msgid "A plugin that adds support for Telegram"
msgstr "Плагін, що додає підтримку у Телеграм"

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 Jiri Eischmann <eischmann@redhat.com>
It is very important that this file does *not* receive any
Invariant Sections as per GFDL.
-->
<component type="addon">
<id>telegram-purple</id>
<extends>pidgin.desktop</extends>
<name>Telegram</name>
<summary>A plugin that adds support for Telegram</summary>
<url type="homepage">https://github.com/majn/telegram-purple</url>
<url type="bugtracker">https://github.com/majn/telegram-purple/issues/</url>
<metadata_license>GFDL-1.3</metadata_license>
<project_license>GPL-2.0+</project_license>
<update_contact>eischmann_at_redhat.com</update_contact>
</component>

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 Jiri Eischmann <eischmann@redhat.com>
It is very important that this file does *not* receive any
Invariant Sections as per GFDL.
-->
<component type="addon">
<id>telegram-purple</id>
<extends>pidgin.desktop</extends>
<name>Telegram</name>
<name xml:lang="bg">Telegram</name>
<name xml:lang="cs-CZ">Telegram</name>
<name xml:lang="de-DE">Telegram</name>
<name xml:lang="es">Telegram</name>
<name xml:lang="es-AR">Telegram</name>
<name xml:lang="fr">Telegram</name>
<name xml:lang="it-IT">Telegram</name>
<name xml:lang="nl">Telegram</name>
<name xml:lang="pl-PL">Telegram</name>
<name xml:lang="ru-RU">Telegram</name>
<name xml:lang="sq">Telegram</name>
<name xml:lang="uk">Телеграм</name>
<summary>A plugin that adds support for Telegram</summary>
<summary xml:lang="bg">Добавка, която добавя поддръжка на Telegram</summary>
<summary xml:lang="cs-CZ">Zásuvný modul, který přidá podporu pro Telegram</summary>
<summary xml:lang="de-DE">Plugin zur Unterstützung von Telegram</summary>
<summary xml:lang="es">Un plugin que añade soporte para Telegram</summary>
<summary xml:lang="es-AR">Un plugin que agrega soporte para Telegram</summary>
<summary xml:lang="fr">Une extension qui ajoute le support pour Telegram</summary>
<summary xml:lang="it-IT">Un plugin che aggiunge il supporto per Telegram</summary>
<summary xml:lang="nl">Een plug-in die ondersteuning voor Telegram toevoegt</summary>
<summary xml:lang="pl-PL">Wtyczka dodająca obsługę protokołu Telegram</summary>
<summary xml:lang="ru-RU">Плагин, добавляющий поддержку Telegram</summary>
<summary xml:lang="sq">Një shtojcë që shton mbulim për Telegram-in</summary>
<summary xml:lang="uk">Плагін, що додає підтримку у Телеграм</summary>
<url type="homepage">https://github.com/majn/telegram-purple</url>
<url type="bugtracker">https://github.com/majn/telegram-purple/issues/</url>
<metadata_license>GFDL-1.3</metadata_license>
<project_license>GPL-2.0+</project_license>
<update_contact>eischmann_at_redhat.com</update_contact>
</component>

156
CHANGELOG.md Normal file
View file

@ -0,0 +1,156 @@
Changelog
---------
##### 1.3.1
- Stability improvements
- Support auto-loading for documents
- Add support for "typing" in group chats (using group-typing-notifications plugin)
- Add support for /kick command in group chats
##### 1.3.0
- channel/supergroup support
- support sending code tags in markdown "backtick" format (see README for example)
- reduce amount of file-transfer popups in Pidgin, auto-load media in the background
- fix stability issues for the win32 build
- fix multiple crashes in libtgl
##### 1.2.6
- Include libtgl bugfix "use-after-not-created for photos"
- Fix Adium bundle version incompatibillity for newest version
##### 1.2.5
- Include libtgl fix to prevent crashes on certain channel messages
- Improve error handling to be more graceful
##### 1.2.4
- Fix crash on unknown media type
- Fix crash on logout after cancelling a file transfer
##### 1.2.3
- Build: Allow compilation on Windows #52 Thanks Eion!
- Build: Drop dependency on LodePNG, Thanks Ben!
- Build: Gettext is now optional
- Fix issue that prevented to send messages to deleted users in certain cases (#174)
- Fix own user being added to the buddy list in certain cases
- Fix that read recipes of own messages are being displayed (#139)
- Fix encoding inconsistencies with Unicode characters (#177)
- Fix auto-joining for chats (#179)
- Fix client not reconnecting anymore under certain circumstances (#173)
- Fix crash on compat-verification (PullRequest #183)
- Remove pointless "create chat" confirmation dialogue
- Improve logging messages
- Always send read recipes when the user is typing or sending a message
- Improve translation and user messages (#139)
- Use native password prompts (Adium)
##### 1.2.2
- fix some licensing issues by not depending on OpenSSL any longer (thanks Ben!)
- add tons of translations (thanks to anyone helping!)
- fix issue that caused empty files
- fix pidgin not reconnecting after hibernation
- fix adium not reconnecting after hibernation
- fix secret chat fingerprint not being displayed after restart
- fix secret chat name not being displayed after restart
##### 1.2.1
##### Bugfixes
- Fix buggy group chat handling
* Assure that foreign users are always listed by their full name instead of the user ID
* Don't automatically add group chats to buddy list to prevent incompatibillities with some libpurple clients
* Fix issue that caused the buddy list to not be correctly updated on joining / leaving participants
* Fix an issue that caused the user list to be printed on every group chat message in Finch
- Fetch chat information lazily to reduce traffic and prevent flood errors
- Improve input validation for phone numbers
###### Features
- Support leaving chats
- Implement the roomlist-API to allow listing of all active chats
##### Version 1.2.0 (Beta 3)
##### Bugfixes
- Fix error in incoming message handling that caused segmentation faults
- Fix failing audio and video transfers
- Mark messages read on other devices as 'deferred' to avoid needless notifications
- Improved buddy list handling (should avoid "unknown" contacts popping up)
- Many small issues (see commit history)
- Fix issues that caused audio and video downloads to not have a proper file ending
- Fix issue that caused very old unused chats to not be available
###### Features
- Allow creation of new group chats
- Allow joining chats by invite link
- Allow exporting chats by invite link
- Support displaying and sending GIFs
- Support joining chats by invite link
##### Version 1.1.0 (Beta 2)
- update to libtgl 2
- support two-factor authentication
- improve sticker support
- add option to control message read recipes
- many bugfixes
##### Version 1.0.0 (Beta 1)
- Move state files into .purple/telegram-purple directory
- Add extended account settings for controlling history and read notifications
- Improved support for Adium
* fix chat bookmarking
* add custom views for account settings and chat joining
##### Version 0.7
- Support uploads and downloads (with some caveats though):
* Uploads wont contain the current file name but a generic one
* Every file is uploaded as a document or picture, so unfortunately no embedded videos and audio (right now)
* Group chats only support picture uploads since nothing else is supported by the UI
- Fix HTML escaping issues
##### Version 0.6.1
- Fix many stability issues
- Do not readd left chats on login
##### Version 0.6
- Support for secret chats
- Receiving geo messages
##### Version 0.5
- Display incoming photos
- Respect received user and chat property updates
- Support changing own profile picture
- Support adding new contacts
- Display service messages
- Works with libpurple proxy settings
##### TODO:
- Picture Uploads
- Audio, Video and File Transfers

View file

38
HACKING.BUILD.md Normal file
View file

@ -0,0 +1,38 @@
# Hacking on the build system
This list was previously maintained as [issue #242](https://github.com/majn/telegram-purple/issues/242), until we realized that this needs proper version-control. (Duh!)
## Exhaustive list of requirements on the build system:
1. `commit.h` must change whenever it disagrees with the current git commit
1. `commit.h` must not change whenever it agrees with the current git commit
1. Must call `cd tgl && ./configure` with appropriate options whenever `tgl/Makefile` is missing, or notices that `./configure` was run. ("Too often" is acceptable as long as `make && make` isn't violated.)
1. Must call `make -C tgl` whenever this might have any effect. ("Too often" is acceptable as long as `make && make` isn't violated.)
1. Any changes due to `make -C tgl` must cause all necessary rebuilds in telegram-purple during the same invocation of make. ("Too often" is acceptable as long as `make && make` isn't violated.)
1. If `tgl/Makefile.in` is missing, explain that we need submodules, and stop.
1. `make -j12` must work fine
1. Must support out-of-CVS builds.
## While ensuring that:
- Must not `-include tgl/Makefile` as it doesn't really support that, and I'm not going to try and convince @vysheng to do that. Also, it's too fragile. You know how he ticks.
- `make && make` must not create any files in the second run (otherwise, `sudo make install` would become hairy)
- Compatibility with other makes
## Approach:
- `commit.h` is a regular file which depends on a .PHONY target `commit`. Building `commit.h` *only* touches `commit.h` if necessary and possible. (=> 1, 2, half of 8)
- Have a target `tgl/Makefile` which depends on `Makefile`. (=> 3)
- The central target `${PRPL_LIBNAME}` shall depend on the .PHONY `submade`, which depends on `tgl/Makefile`, and essentially executes `make -C tgl`. (=> 4, time constraint of 5)
- All objects of telegram-purple depend on `tgl/libs/libtgl.a`. Rationale: if `tgl/libs/libtgl.a` stays the same, then nothing in tgl changed. If `tgl/libs/libtgl.a` changes, then due to lots of black preprocessor magic within tgl, it can't be safely determined which, if any, objects of telegram-purple can be re-used. Also, if tgl got recompiled (~ 1 minute), then tgp can be recompiled, too (~ 5 seconds). (=> dependency constraint of 5)
- Let `tgl/Makefile` depend on `tgl/Makefile.in`, and put the warning into the rule for the latter. (=> 6)
- The above already implies a dependency DAG that is completely known to make; except at one point: let `tgl/libs/libtgl.a` depend on `submade`, without any own code. Now make ensure thread-safety on it's own. (=> 7)
- Bundle commit.h into the origtar (=> other half of 8)
## Side effects:
- Should be ultimately robust. Then again, that's what I thought about the last few attempts, and they didn't last long.
- This reduces the number of .PHONYs drastically, making it easier to read, and making it easier to prove that `make && make` doesn't change anything.
- Even though `submade` should trigger once and only once, this can handle multiple invocations just fine, too.
- All files dependent on `commit.h` need to be mentioned explicitly as dependents in the Makefile. This is ugly, but (as far as I can see) unavoidable. Thankfully, any errors here will get detected by automated testing.
- We currently use only one GNU make specific extension. See https://github.com/majn/telegram-purple/issues/137#issuecomment-167970054

20
HACKING.md Normal file
View file

@ -0,0 +1,20 @@
# Contributing
This is Open Source Software. We realized that we didn't pass the Patch Test
## What to contribute
Here's a few places to start:
- Report any bugs you find.
- No, seriously! Most of the bugs don't even get reported, or the reporter only writes "Doesn't work for me" and then vanishes.
- ["help wanted" issues](https://github.com/majn/telegram-purple/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+-label%3A%22in-pipeline%22), especially automated testing
- ["secret chat" issues](https://github.com/majn/telegram-purple/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22secret+chats%22+-label%3A%22in-pipeline%22+)
- Portability (especially endianness) of tgl (external project)
- [Issues of tgl](https://github.com/vysheng/tgl/issues) -- lots and lots of false or obsolete reports
- Slim down the size of the generated files in `tgl/auto`, as this currently dominates the build time. Yuk!
- Make sure that the libpurple-devs don't break libpurple any further.
## How to contribute
Write [an issue](https://github.com/majn/telegram-purple/issues/new), shoot us a mail (scrape the address from the git history), or contact us in dev chat (changing URL, see README for that).

339
LICENSE.h
View file

@ -1,339 +0,0 @@
" GNU GENERAL PUBLIC LICENSE\n"
" Version 2, June 1991\n"
"\n"
" Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n"
" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
" Everyone is permitted to copy and distribute verbatim copies\n"
" of this license document, but changing it is not allowed.\n"
"\n"
" Preamble\n"
"\n"
" The licenses for most software are designed to take away your\n"
"freedom to share and change it. By contrast, the GNU General Public\n"
"License is intended to guarantee your freedom to share and change free\n"
"software--to make sure the software is free for all its users. This\n"
"General Public License applies to most of the Free Software\n"
"Foundation's software and to any other program whose authors commit to\n"
"using it. (Some other Free Software Foundation software is covered by\n"
"the GNU Lesser General Public License instead.) You can apply it to\n"
"your programs, too.\n"
"\n"
" When we speak of free software, we are referring to freedom, not\n"
"price. Our General Public Licenses are designed to make sure that you\n"
"have the freedom to distribute copies of free software (and charge for\n"
"this service if you wish), that you receive source code or can get it\n"
"if you want it, that you can change the software or use pieces of it\n"
"in new free programs; and that you know you can do these things.\n"
"\n"
" To protect your rights, we need to make restrictions that forbid\n"
"anyone to deny you these rights or to ask you to surrender the rights.\n"
"These restrictions translate to certain responsibilities for you if you\n"
"distribute copies of the software, or if you modify it.\n"
"\n"
" For example, if you distribute copies of such a program, whether\n"
"gratis or for a fee, you must give the recipients all the rights that\n"
"you have. You must make sure that they, too, receive or can get the\n"
"source code. And you must show them these terms so they know their\n"
"rights.\n"
"\n"
" We protect your rights with two steps: (1) copyright the software, and\n"
"(2) offer you this license which gives you legal permission to copy,\n"
"distribute and/or modify the software.\n"
"\n"
" Also, for each author's protection and ours, we want to make certain\n"
"that everyone understands that there is no warranty for this free\n"
"software. If the software is modified by someone else and passed on, we\n"
"want its recipients to know that what they have is not the original, so\n"
"that any problems introduced by others will not reflect on the original\n"
"authors' reputations.\n"
"\n"
" Finally, any free program is threatened constantly by software\n"
"patents. We wish to avoid the danger that redistributors of a free\n"
"program will individually obtain patent licenses, in effect making the\n"
"program proprietary. To prevent this, we have made it clear that any\n"
"patent must be licensed for everyone's free use or not licensed at all.\n"
"\n"
" The precise terms and conditions for copying, distribution and\n"
"modification follow.\n"
"\n"
" GNU GENERAL PUBLIC LICENSE\n"
" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n"
"\n"
" 0. This License applies to any program or other work which contains\n"
"a notice placed by the copyright holder saying it may be distributed\n"
"under the terms of this General Public License. The \"Program\", below,\n"
"refers to any such program or work, and a \"work based on the Program\"\n"
"means either the Program or any derivative work under copyright law:\n"
"that is to say, a work containing the Program or a portion of it,\n"
"either verbatim or with modifications and/or translated into another\n"
"language. (Hereinafter, translation is included without limitation in\n"
"the term \"modification\".) Each licensee is addressed as \"you\".\n"
"\n"
"Activities other than copying, distribution and modification are not\n"
"covered by this License; they are outside its scope. The act of\n"
"running the Program is not restricted, and the output from the Program\n"
"is covered only if its contents constitute a work based on the\n"
"Program (independent of having been made by running the Program).\n"
"Whether that is true depends on what the Program does.\n"
"\n"
" 1. You may copy and distribute verbatim copies of the Program's\n"
"source code as you receive it, in any medium, provided that you\n"
"conspicuously and appropriately publish on each copy an appropriate\n"
"copyright notice and disclaimer of warranty; keep intact all the\n"
"notices that refer to this License and to the absence of any warranty;\n"
"and give any other recipients of the Program a copy of this License\n"
"along with the Program.\n"
"\n"
"You may charge a fee for the physical act of transferring a copy, and\n"
"you may at your option offer warranty protection in exchange for a fee.\n"
"\n"
" 2. You may modify your copy or copies of the Program or any portion\n"
"of it, thus forming a work based on the Program, and copy and\n"
"distribute such modifications or work under the terms of Section 1\n"
"above, provided that you also meet all of these conditions:\n"
"\n"
" a) You must cause the modified files to carry prominent notices\n"
" stating that you changed the files and the date of any change.\n"
"\n"
" b) You must cause any work that you distribute or publish, that in\n"
" whole or in part contains or is derived from the Program or any\n"
" part thereof, to be licensed as a whole at no charge to all third\n"
" parties under the terms of this License.\n"
"\n"
" c) If the modified program normally reads commands interactively\n"
" when run, you must cause it, when started running for such\n"
" interactive use in the most ordinary way, to print or display an\n"
" announcement including an appropriate copyright notice and a\n"
" notice that there is no warranty (or else, saying that you provide\n"
" a warranty) and that users may redistribute the program under\n"
" these conditions, and telling the user how to view a copy of this\n"
" License. (Exception: if the Program itself is interactive but\n"
" does not normally print such an announcement, your work based on\n"
" the Program is not required to print an announcement.)\n"
"\n"
"These requirements apply to the modified work as a whole. If\n"
"identifiable sections of that work are not derived from the Program,\n"
"and can be reasonably considered independent and separate works in\n"
"themselves, then this License, and its terms, do not apply to those\n"
"sections when you distribute them as separate works. But when you\n"
"distribute the same sections as part of a whole which is a work based\n"
"on the Program, the distribution of the whole must be on the terms of\n"
"this License, whose permissions for other licensees extend to the\n"
"entire whole, and thus to each and every part regardless of who wrote it.\n"
"\n"
"Thus, it is not the intent of this section to claim rights or contest\n"
"your rights to work written entirely by you; rather, the intent is to\n"
"exercise the right to control the distribution of derivative or\n"
"collective works based on the Program.\n"
"\n"
"In addition, mere aggregation of another work not based on the Program\n"
"with the Program (or with a work based on the Program) on a volume of\n"
"a storage or distribution medium does not bring the other work under\n"
"the scope of this License.\n"
"\n"
" 3. You may copy and distribute the Program (or a work based on it,\n"
"under Section 2) in object code or executable form under the terms of\n"
"Sections 1 and 2 above provided that you also do one of the following:\n"
"\n"
" a) Accompany it with the complete corresponding machine-readable\n"
" source code, which must be distributed under the terms of Sections\n"
" 1 and 2 above on a medium customarily used for software interchange; or,\n"
"\n"
" b) Accompany it with a written offer, valid for at least three\n"
" years, to give any third party, for a charge no more than your\n"
" cost of physically performing source distribution, a complete\n"
" machine-readable copy of the corresponding source code, to be\n"
" distributed under the terms of Sections 1 and 2 above on a medium\n"
" customarily used for software interchange; or,\n"
"\n"
" c) Accompany it with the information you received as to the offer\n"
" to distribute corresponding source code. (This alternative is\n"
" allowed only for noncommercial distribution and only if you\n"
" received the program in object code or executable form with such\n"
" an offer, in accord with Subsection b above.)\n"
"\n"
"The source code for a work means the preferred form of the work for\n"
"making modifications to it. For an executable work, complete source\n"
"code means all the source code for all modules it contains, plus any\n"
"associated interface definition files, plus the scripts used to\n"
"control compilation and installation of the executable. However, as a\n"
"special exception, the source code distributed need not include\n"
"anything that is normally distributed (in either source or binary\n"
"form) with the major components (compiler, kernel, and so on) of the\n"
"operating system on which the executable runs, unless that component\n"
"itself accompanies the executable.\n"
"\n"
"If distribution of executable or object code is made by offering\n"
"access to copy from a designated place, then offering equivalent\n"
"access to copy the source code from the same place counts as\n"
"distribution of the source code, even though third parties are not\n"
"compelled to copy the source along with the object code.\n"
"\n"
" 4. You may not copy, modify, sublicense, or distribute the Program\n"
"except as expressly provided under this License. Any attempt\n"
"otherwise to copy, modify, sublicense or distribute the Program is\n"
"void, and will automatically terminate your rights under this License.\n"
"However, parties who have received copies, or rights, from you under\n"
"this License will not have their licenses terminated so long as such\n"
"parties remain in full compliance.\n"
"\n"
" 5. You are not required to accept this License, since you have not\n"
"signed it. However, nothing else grants you permission to modify or\n"
"distribute the Program or its derivative works. These actions are\n"
"prohibited by law if you do not accept this License. Therefore, by\n"
"modifying or distributing the Program (or any work based on the\n"
"Program), you indicate your acceptance of this License to do so, and\n"
"all its terms and conditions for copying, distributing or modifying\n"
"the Program or works based on it.\n"
"\n"
" 6. Each time you redistribute the Program (or any work based on the\n"
"Program), the recipient automatically receives a license from the\n"
"original licensor to copy, distribute or modify the Program subject to\n"
"these terms and conditions. You may not impose any further\n"
"restrictions on the recipients' exercise of the rights granted herein.\n"
"You are not responsible for enforcing compliance by third parties to\n"
"this License.\n"
"\n"
" 7. If, as a consequence of a court judgment or allegation of patent\n"
"infringement or for any other reason (not limited to patent issues),\n"
"conditions are imposed on you (whether by court order, agreement or\n"
"otherwise) that contradict the conditions of this License, they do not\n"
"excuse you from the conditions of this License. If you cannot\n"
"distribute so as to satisfy simultaneously your obligations under this\n"
"License and any other pertinent obligations, then as a consequence you\n"
"may not distribute the Program at all. For example, if a patent\n"
"license would not permit royalty-free redistribution of the Program by\n"
"all those who receive copies directly or indirectly through you, then\n"
"the only way you could satisfy both it and this License would be to\n"
"refrain entirely from distribution of the Program.\n"
"\n"
"If any portion of this section is held invalid or unenforceable under\n"
"any particular circumstance, the balance of the section is intended to\n"
"apply and the section as a whole is intended to apply in other\n"
"circumstances.\n"
"\n"
"It is not the purpose of this section to induce you to infringe any\n"
"patents or other property right claims or to contest validity of any\n"
"such claims; this section has the sole purpose of protecting the\n"
"integrity of the free software distribution system, which is\n"
"implemented by public license practices. Many people have made\n"
"generous contributions to the wide range of software distributed\n"
"through that system in reliance on consistent application of that\n"
"system; it is up to the author/donor to decide if he or she is willing\n"
"to distribute software through any other system and a licensee cannot\n"
"impose that choice.\n"
"\n"
"This section is intended to make thoroughly clear what is believed to\n"
"be a consequence of the rest of this License.\n"
"\n"
" 8. If the distribution and/or use of the Program is restricted in\n"
"certain countries either by patents or by copyrighted interfaces, the\n"
"original copyright holder who places the Program under this License\n"
"may add an explicit geographical distribution limitation excluding\n"
"those countries, so that distribution is permitted only in or among\n"
"countries not thus excluded. In such case, this License incorporates\n"
"the limitation as if written in the body of this License.\n"
"\n"
" 9. The Free Software Foundation may publish revised and/or new versions\n"
"of the General Public License from time to time. Such new versions will\n"
"be similar in spirit to the present version, but may differ in detail to\n"
"address new problems or concerns.\n"
"\n"
"Each version is given a distinguishing version number. If the Program\n"
"specifies a version number of this License which applies to it and \"any\n"
"later version\", you have the option of following the terms and conditions\n"
"either of that version or of any later version published by the Free\n"
"Software Foundation. If the Program does not specify a version number of\n"
"this License, you may choose any version ever published by the Free Software\n"
"Foundation.\n"
"\n"
" 10. If you wish to incorporate parts of the Program into other free\n"
"programs whose distribution conditions are different, write to the author\n"
"to ask for permission. For software which is copyrighted by the Free\n"
"Software Foundation, write to the Free Software Foundation; we sometimes\n"
"make exceptions for this. Our decision will be guided by the two goals\n"
"of preserving the free status of all derivatives of our free software and\n"
"of promoting the sharing and reuse of software generally.\n"
"\n"
" NO WARRANTY\n"
"\n"
" 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n"
"FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n"
"OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n"
"PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n"
"OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n"
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n"
"TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n"
"PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n"
"REPAIR OR CORRECTION.\n"
"\n"
" 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"
"WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n"
"REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n"
"INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n"
"OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n"
"TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n"
"YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n"
"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n"
"POSSIBILITY OF SUCH DAMAGES.\n"
"\n"
" END OF TERMS AND CONDITIONS\n"
"\n"
" How to Apply These Terms to Your New Programs\n"
"\n"
" If you develop a new program, and you want it to be of the greatest\n"
"possible use to the public, the best way to achieve this is to make it\n"
"free software which everyone can redistribute and change under these terms.\n"
"\n"
" To do so, attach the following notices to the program. It is safest\n"
"to attach them to the start of each source file to most effectively\n"
"convey the exclusion of warranty; and each file should have at least\n"
"the \"copyright\" line and a pointer to where the full notice is found.\n"
"\n"
" <one line to give the program's name and a brief idea of what it does.>\n"
" Copyright (C) <year> <name of author>\n"
"\n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms of the GNU General Public License as published by\n"
" the Free Software Foundation; either version 2 of the License, or\n"
" (at your option) any later version.\n"
"\n"
" This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
" GNU General Public License for more details.\n"
"\n"
" You should have received a copy of the GNU General Public License along\n"
" with this program; if not, write to the Free Software Foundation, Inc.,\n"
" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n"
"\n"
"Also add information on how to contact you by electronic and paper mail.\n"
"\n"
"If the program is interactive, make it output a short notice like this\n"
"when it starts in an interactive mode:\n"
"\n"
" Gnomovision version 69, Copyright (C) year name of author\n"
" Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n"
" This is free software, and you are welcome to redistribute it\n"
" under certain conditions; type `show c' for details.\n"
"\n"
"The hypothetical commands `show w' and `show c' should show the appropriate\n"
"parts of the General Public License. Of course, the commands you use may\n"
"be called something other than `show w' and `show c'; they could even be\n"
"mouse-clicks or menu items--whatever suits your program.\n"
"\n"
"You should also get your employer (if you work as a programmer) or your\n"
"school, if any, to sign a \"copyright disclaimer\" for the program, if\n"
"necessary. Here is a sample; alter the names:\n"
"\n"
" Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n"
" `Gnomovision' (which makes passes at compilers) written by James Hacker.\n"
"\n"
" <signature of Ty Coon>, 1 April 1989\n"
" Ty Coon, President of Vice\n"
"\n"
"This General Public License does not permit incorporating your program into\n"
"proprietary programs. If your program is a subroutine library, you may\n"
"consider it more useful to permit linking proprietary applications with the\n"
"library. If this is what you want to do, use the GNU Lesser General\n"
"Public License instead of this License.\n"

View file

@ -1,35 +1,234 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
srcdir=@srcdir@
prefix=@prefix@
datarootdir=@datarootdir@
localedir=@localedir@
gettext_package=@GETTEXT_PACKAGE@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
CPPFLAGS=@CPPFLAGS@
DEFS=@DEFS@
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
CFLAGS=@CFLAGS@ @PURPLE_CFLAGS@ @DEFS@ -DENABLE_NLS -DLOCALEDIR='"$(localedir)"' -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I${srcdir} -I. -fno-strict-aliasing -fPIC -D_FORTIFY_SOURCE=2
LDFLAGS=@LDFLAGS@ @OPENSSL_LIBS@ @PURPLE_LIBS@ @LIBS@ -rdynamic -ggdb
DIR_PERM=0755
FILE_PERM=0644
EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
HEADERS= ${srcdir}/constants.h ${srcdir}/include.h ${srcdir}/interface.h ${srcdir}/LICENSE.h ${srcdir}/loop.h ${srcdir}/mtproto-client.h ${srcdir}/mtproto-common.h ${srcdir}/net.h ${srcdir}/no-preview.h ${srcdir}/queries.h ${srcdir}/structures.h ${srcdir}/telegram.h ${srcdir}/tree.h ${srcdir}/config.h ${srcdir}/binlog.h ${srcdir}/tools.h ${srcdir}/lua-tg.h
INCLUDE=-I. -I${srcdir}
CC=@CC@
OBJECTS=main.o loop.o interface.o net.o mtproto-common.o mtproto-client.o queries.o structures.o binlog.o tools.o lua-tg.o
PKG_CONFIG=@PKG_CONFIG@
MSGFMT_PATH=@MSGFMT_PATH@
# Check if -fstack-protector-strong is supported before enabling it
SPUNSUPPORTED = $(shell $(CC) -fstack-protector-strong 2>&1 | grep -c 'stack-protector-strong')
ifeq "$(SPUNSUPPORTED)" "0"
CFLAGS += -fstack-protector-strong
endif
DEP=dep
EXE=bin
OBJ=objs
DIR_LIST=${DEP} ${EXE} ${OBJ}
PLUGIN_OBJECTS=${OBJ}/tgp-net.o ${OBJ}/tgp-timers.o ${OBJ}/msglog.o ${OBJ}/telegram-base.o ${OBJ}/telegram-purple.o ${OBJ}/tgp-2prpl.o ${OBJ}/tgp-structs.o ${OBJ}/tgp-utils.o ${OBJ}/tgp-chat.o ${OBJ}/tgp-ft.o ${OBJ}/tgp-msg.o ${OBJ}/tgp-request.o ${OBJ}/tgp-blist.o ${OBJ}/tgp-info.o
ALL_OBJS=${PLUGIN_OBJECTS}
ifdef MSGFMT_PATH
LOCALES=$(shell cat po/LINGUAS)
LOCALE_MOS=$(addprefix po/,$(addsuffix .mo,$(LOCALES)))
endif
.SUFFIXES:
.SUFFIXES: .c .h .o
all: telegram
PRPL_NAME=telegram-purple.so
PRPL_LIBNAME=${EXE}/${PRPL_NAME}
all: ${PRPL_LIBNAME} $(LOCALE_MOS)
${OBJECTS}: ${HEADERS}
telegram: ${OBJECTS}
${CC} ${OBJECTS} ${LINK_FLAGS} -o $@
.c.o :
${CC} ${COMPILE_FLAGS} ${INCLUDE} -c $< -o $@
PLUGIN_DIR_PURPLE=$(shell ${PKG_CONFIG} --variable=plugindir purple)
DATA_ROOT_DIR_PURPLE=$(shell ${PKG_CONFIG} --variable=datarootdir purple)
CRYPTO_FLAG=@CRYPTO_FLAG@
clean:
rm -rf *.o telegram config.log config.status > /dev/null || echo "all clean"
### == 'Magic' targets and infrastructure. == ###
# Here be dragons! See https://github.com/majn/telegram-purple/issues/242
# For the full list of requirements, goals, and rationale.
.PHONY: create_dirs
create_dirs: ${DIR_LIST}
${DIR_LIST}:
@test -d $@ || mkdir -p $@
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${ALL_OBJS}))
DEPENDENCE_LIST=${DEPENDENCE}
-include ${DEPENDENCE_LIST}
tgl/Makefile.in:
@echo "tgl/Makefile.in not found. Maybe you need to 'git submodule update --init --recursive' ?" && exit 1
tgl/Makefile: tgl/Makefile.in Makefile
cd tgl && ./configure -q ${CRYPTO_FLAG} --disable-extf CFLAGS="@CFLAGS@" LDFLAGS="@LDFLAGS@"
tgl/libs/libtgl.a: tgl/Makefile
+${MAKE} -C tgl libs/libtgl.a
.PHONY: commit
commit:
# The *commands* for commit.h shall always be executed, but the
# *file* commit.h should only be considered to have changed in rare cases.
GIT_COMMIT=$(shell git rev-parse HEAD | cut -c1-10)
commit.h: commit
@./commit.h.gen
# Ugly, but necessary, because otherwise commit.h would not get generated:
test/loadtest.c: commit.h
# Ugly, but necessary, because otherwise commit.h would not get generated:
telegram-purple.c: commit.h
### == 'Normal' build. == ###
${PLUGIN_OBJECTS}: ${OBJ}/%.o: ${srcdir}/%.c tgl/libs/libtgl.a | create_dirs
echo $@ && ${CC} ${CFLAGS} ${CPPFLAGS} -I ${srcdir}/tgl -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
po/%.mo: po/%.po
${MSGFMT_PATH} -cf -o $@ $< >/dev/null 2>&1
${PRPL_LIBNAME}: ${PLUGIN_OBJECTS} tgl/libs/libtgl.a | create_dirs
${CC} -shared -o $@ $^ ${LDFLAGS}
### == noicon_{,un}install targets. Use only if you know that you don't need icons. Note that pidgin uses those files. == ###
.PHONY: noicon_install
noicon_install: $(PRPL_LIBNAME) $(LOCALE_MOS)
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
mkdir -m $(DIR_PERM) -p $(DESTDIR)/etc/telegram-purple
install -m $(FILE_PERM) tg-server.tglpub $(DESTDIR)/etc/telegram-purple/server.tglpub
# Assume that the user does not use AppStream if she doesn't want icons
@for lang in $(LOCALES); do \
mkdir -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
echo "installing po/$$lang.mo to $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo"; \
install -m $(FILE_PERM) po/$$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo; \
done
.PHONY: noicon_uninstall
noicon_uninstall:
rm -f $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
rm -f $(DESTDIR)/etc/telegram-purple/server.pub # TODO: Remove this in later versions
rm -f $(DESTDIR)/etc/telegram-purple/server.tglpub
# TODO: Delete all installed .mo's, no matter what LINGUAS says.
@for lang in $(LOCALES); do \
echo "removing $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo"; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo; \
done
### == Main {,un}install targets. This should satisfy most needs. == ###
.PHONY: install
install: noicon_install
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16
install -m $(FILE_PERM) imgs/telegram16.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16/telegram.png
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22
install -m $(FILE_PERM) imgs/telegram22.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/telegram.png
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48
install -m $(FILE_PERM) imgs/telegram48.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/telegram.png
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(datarootdir)/appdata
install -m $(FILE_PERM) AppStream/telegram-purple.metainfo.xml $(DESTDIR)$(datarootdir)/appdata/telegram-purple.metainfo.xml
.PHONY: uninstall
uninstall: noicon_uninstall
rm -f $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16/telegram.png
rm -f $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/telegram.png
rm -f $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/telegram.png
rm -f $(DESTDIR)$(datarootdir)/appdata/telegram-purple.metainfo.xml
### == The local_{,un}install targets, in case you're not root. == ###
.PHONY: local_install
local_install:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/plugins
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
# See telegram-base.c, function get_user_pk_path for justification:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/telegram-purple
install -m $(FILE_PERM) tg-server.tglpub $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub
.PHONY: local_uninstall
local_uninstall:
rm -f $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
rm -f $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub
### == Handling and maintenance. Subject to rapid change, shouldn't be used in scripts. == ###
.PHONY: plugin
plugin: $(PRPL_LIBNAME)
.PHONY: strip
strip: $(PRPL_LIBNAME)
$(STRIP) --strip-unneeded $(PRPL_LIBNAME)
.PHONY: build-nsi
build-nsi: telegram-purple.nsi.awk telegram-purple.nsi.awk-in
awk -f telegram-purple.nsi.awk telegram-purple.nsi.awk-in > telegram-purple.nsi
.PHONY: run
run:
pidgin -d | grep 'telegram\|plugin\|proxy'
.PHONY: debug
debug: install
ddd pidgin
DIST_ERR_MSG="Working directory is not git clean.\
Run 'git status' to show what files are causing this.\
Please note that 'make dist' packages the state in git, not the one on your disk."
SUBMOD_ERR_MSG="Couldn't find tgl/tl-parser/tl-parser.c\
Are all submodules properly initialized and updated?"
# Not PHONY
.git:
@echo "Not in a git folder. Features that require git are disabled."; exit 1
.PHONY: check-clean
check-clean: .git
@test "x" = x"`git status --porcelain`" || (echo ${DIST_ERR_MSG}; exit 1)
@test -r tgl/tl-parser/.git || (echo ${SUBMOD_ERR_MSG}; exit 1)
# Feel free to remove the "check-clean" dependency if you know what you're doing.
.PHONY: dist
dist: check-clean commit.h .git create_dirs
./gen-origtar
### == Cleaning in various flavors == ###
.PHONY: clean-here
clean-here:
rm -rf ${DIR_LIST} $(PRPL_LIBNAME) po/*.mo autom4te.cache AppStream/po/*.mo
-include test/Makefile
.PHONY: clean
clean: clean-here clean-test tgl/Makefile
+${MAKE} -C tgl clean

173
Makefile.mingw Normal file
View file

@ -0,0 +1,173 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres, Eion Robb 2014-2015
srcdir=.
gettext_package=telegram-purple
PURPLE_VERSION = 2.10.11
PIDGIN_TREE_TOP := ../pidgin-$(PURPLE_VERSION)
WIN32_DEV_TOP = $(PIDGIN_TREE_TOP)/../win32-dev
MAKENSIS ?= "$(PROGRAMFILES)/NSIS/makensis.exe"
PLUGIN_VERSION ?= 1.2.2
GMSGFMT ?= $(WIN32_DEV_TOP)/gettext-0.17/bin/msgfmt
CFLAGS=-I$(WIN32_DEV_TOP)/libgcrypt-1.6.3/include -I$(WIN32_DEV_TOP)/libgpg-error-1.12-2/include -I$(WIN32_DEV_TOP)/glib-2.28.8/include -I$(WIN32_DEV_TOP)/glib-2.28.8/include/glib-2.0 -I$(WIN32_DEV_TOP)/glib-2.28.8/lib/glib-2.0/include -I$(PIDGIN_TREE_TOP)/libpurple -I$(WIN32_DEV_TOP)/libwebp-0.4.3-1/include -DHAVE_CONFIG_H -DENABLE_NLS -DPACKAGE_VERSION='"$(PLUGIN_VERSION)"' -Wall -Wextra -Werror -Wno-deprecated-declarations -Wno-unused-parameter -I${srcdir} -I. -fno-strict-aliasing
LDFLAGS=-L$(WIN32_DEV_TOP)/libgcrypt-1.6.3/lib -L$(WIN32_DEV_TOP)/libwebp-0.4.3-1/lib -L$(WIN32_DEV_TOP)/gettext-0.18/bin -L$(PIDGIN_TREE_TOP)/libpurple -L$(WIN32_DEV_TOP)/glib-2.28.8/lib -lpurple -lintl -lglib-2.0 -lwebp -lz -lgcrypt -Wl,--export-all-symbols -ggdb -lws2_32 -static-libgcc
DIR_PERM=0755
FILE_PERM=0644
CC = $(WIN32_DEV_TOP)/mingw/bin/gcc
PKG_CONFIG=
DEP=dep
EXE=bin
OBJ=objs
LIB=libs
DIR_LIST=${DEP} ${EXE} ${OBJ} ${LIB} ${DEP}/lodepng ${OBJ}/lodepng
PLUGIN_OBJECTS=${OBJ}/tgp-net.o ${OBJ}/tgp-timers.o ${OBJ}/msglog.o ${OBJ}/telegram-base.o ${OBJ}/telegram-purple.o ${OBJ}/tgp-2prpl.o ${OBJ}/tgp-structs.o ${OBJ}/tgp-utils.o ${OBJ}/tgp-chat.o ${OBJ}/tgp-ft.o ${OBJ}/tgp-msg.o ${OBJ}/tgp-request.o ${OBJ}/tgp-blist.o ${OBJ}/lodepng/lodepng.o
ALL_OBJS=${PLUGIN_OBJECTS} ${OBJ}/tgp-info.o
LOCALES=$(patsubst %.po, %.mo, $(wildcard po/*.po))
.SUFFIXES:
.SUFFIXES: .c .h .o
PRPL_NAME=libtelegram.dll
PRPL_LIBNAME=${EXE}/${PRPL_NAME}
all: ${PRPL_LIBNAME} ${LOCALES}
PLUGIN_DIR_PURPLE="$(PROGRAMFILES)/Pidgin/plugins"
DATA_ROOT_DIR_PURPLE="$(PROGRAMFILES)/Pidgin"
COPY_ICONS=yes
localedir=$(DATA_ROOT_DIR_PURPLE)/locale
create_dirs: ${DIR_LIST}
${DIR_LIST}:
@test -d $@ || mkdir -p $@
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${ALL_OBJS}))
DEPENDENCE_LIST=${DEPENDENCE}
-include ${DEPENDENCE_LIST}
# The dependency on tgl/libs/libtgl.a ensures that "make -C tgl" was called,
# and most importantly: It ensures that all automatic headers exist.
${PLUGIN_OBJECTS}: ${OBJ}/%.o: ${srcdir}/%.c ${LIB}/libtgl.a | create_dirs
echo $@ && ${CC} ${CFLAGS} ${CPPFLAGS} -I ${srcdir}/tgl -I ${srcdir}/lodepng -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
tgl/Makefile.mingw: ${srcdir}/Makefile.tgl.mingw
cp $< $@
tgl/libs/libtgl.a: tgl/Makefile.mingw
+make -C tgl -f Makefile.mingw
tgl/config.h: ${srcdir}/config.h.tgl.mingw
cp $< $@
config.h: ${srcdir}/config.h.mingw
cp $< $@
po/%.mo: po/%.po
$(GMSGFMT) -cf -o $@ $<
${LIB}/libtgl.a: tgl/libs/libtgl.a | create_dirs
cp $< $@
${PRPL_LIBNAME}: ${PLUGIN_OBJECTS} ${LIB}/libtgl.a | create_dirs
${CC} -shared -o $@ $^ ${LDFLAGS}
.PHONY: plugin
plugin: $(PRPL_LIBNAME)
.PHONY: strip
strip: $(PRPL_LIBNAME)
$(STRIP) --strip-unneeded $(PRPL_LIBNAME)
.PHONY: install
install: $(PRPL_LIBNAME) $(LOCALES)
mkdir -m $(DIR_PERM) -p $(PLUGIN_DIR_PURPLE)
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
install -m $(FILE_PERM) tg-server.tglpub $(DATA_ROOT_DIR_PURPLE)/server.tglpub
ifeq ($(COPY_ICONS),no)
@echo "Not copying icons due to configure-option --disable-icons."
@echo " If you're using Finch, Empathy, or Telepathy, then this is a good idea."
@echo " If you're using Pidgin, then this is a bad idea."
@echo " If you're using Adium, read the README.md: You're using the wrong build system!"
else
mkdir -m $(DIR_PERM) -p $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16
install -m $(FILE_PERM) imgs/telegram16.png $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16/telegram.png
mkdir -m $(DIR_PERM) -p $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22
install -m $(FILE_PERM) imgs/telegram22.png $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/telegram.png
mkdir -m $(DIR_PERM) -p $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48
install -m $(FILE_PERM) imgs/telegram48.png $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/telegram.png
endif
@for lang in $(shell cat po/LINGUAS); do \
mkdir -p $(localedir)/$$lang/LC_MESSAGES; \
echo "installing po/$$lang.mo to $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo"; \
install -m $(FILE_PERM) po/$$lang.mo $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo; \
done
.PHONY: uninstall
uninstall:
rm -f $(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
rm -f $(DATA_ROOT_DIR_PURPLE)/server.tglpub
rm -f $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/16/telegram.png
rm -f $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/telegram.png
rm -f $(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/telegram.png
# TODO: Delete all installed .mo's, no matter what LINGUAS says.
@for lang in $(shell cat po/LINGUAS); do \
echo "removing $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo"; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(gettext_package).mo; \
done
.PHONY: local_install
local_install:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/plugins
install -m $(FILE_PERM) $(PRPL_LIBNAME) $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
# See telegram-base.c, function get_user_pk_path for justification:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(HOME)/.purple/telegram-purple
install -m $(FILE_PERM) tg-server.tglpub $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub
.PHONY: local_uninstall
local_uninstall:
rm -f $(DESTDIR)$(HOME)/.purple/plugins/$(PRPL_NAME)
rm -f $(DESTDIR)$(HOME)/.purple/telegram-purple/server.tglpub
.PHONY: run
run:
pidgin -d | grep 'telegram\|plugin\|proxy'
.PHONY: debug
debug: install
ddd pidgin
.PHONY: clean-here
clean-here:
rm -rf ${DIR_LIST} $(PRPL_C_OBJS) $(PRPL_LIBNAME) po/*.mo
.PHONY: clean
clean: clean-here tgl/Makefile.mingw
+make -C tgl -f Makefile.mingw clean
.PHONY: installer
installer: telegram-purple.nsi $(PRPL_LIBNAME) $(LOCALES)
$(MAKENSIS) -DPLUGIN_VERSION="$(PLUGIN_VERSION)" -DPRPL_NAME="$(PRPL_NAME)" -DWIN32_DEV_TOP="$(WIN32_DEV_TOP)" telegram-purple.nsi

116
Makefile.tgl.mingw Normal file
View file

@ -0,0 +1,116 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres, Eion Robb 2014-2015
srcdir=.
WIN32_DEV_TOP ?= ../../win32-dev
CFLAGS=-I$(WIN32_DEV_TOP)/libgcrypt-1.6.3/include -I$(WIN32_DEV_TOP)/libgpg-error-1.12-2/include -I$(WIN32_DEV_TOP)/glib-2.28.8/include -DHAVE_CONFIG_H
LDFLAGS=-L$(WIN32_DEV_TOP)/libgcrypt-1.6.3/lib -I$(WIN32_DEV_TOP)/libgpg-error-1.12-2/lib -L$(WIN32_DEV_TOP)/libwebp-0.4.3-1/lib -L$(WIN32_DEV_TOP)/glib-2.28.8/lib -lwebp -lz -lgcrypt -Wl,--export-all-symbols -ggdb
CPPFLAGS=
DEFS=-DHAVE_CONFIG_H
COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter
EXTRA_LIBS=-lz -lgcrypt
LOCAL_LDFLAGS=-ggdb ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
DEP=dep
AUTO=auto
OBJ=objs
LIB=libs
EXE=bin
DIR_LIST=${DEP} ${DEP}/crypto ${AUTO} ${EXE} ${OBJ} ${OBJ}/crypto ${LIB} ${DEP}/auto ${OBJ}/auto
LIB_LIST=${LIB}/libtgl.a ${LIB}/libtgl.dll
TGL_OBJECTS=${OBJ}/mtproto-common.o ${OBJ}/mtproto-client.o ${OBJ}/mtproto-key.o ${OBJ}/queries.o ${OBJ}/structures.o ${OBJ}/binlog.o ${OBJ}/tgl.o ${OBJ}/updates.o ${OBJ}/tg-mime-types.o ${OBJ}/mtproto-utils.o ${OBJ}/crypto/bn_openssl.o ${OBJ}/crypto/bn_altern.o ${OBJ}/crypto/rsa_pem_openssl.o ${OBJ}/crypto/rsa_pem_altern.o ${OBJ}/crypto/md5_openssl.o ${OBJ}/crypto/md5_altern.o ${OBJ}/crypto/sha_openssl.o ${OBJ}/crypto/sha_altern.o ${OBJ}/crypto/aes_openssl.o ${OBJ}/crypto/aes_altern.o
TGL_OBJECTS_AUTO=${OBJ}/auto/auto-skip.o ${OBJ}/auto/auto-fetch.o ${OBJ}/auto/auto-store.o ${OBJ}/auto/auto-autocomplete.o ${OBJ}/auto/auto-types.o ${OBJ}/auto/auto-fetch-ds.o ${OBJ}/auto/auto-free-ds.o ${OBJ}/auto/auto-store-ds.o ${OBJ}/auto/auto-print-ds.o
TLD_OBJECTS=${OBJ}/dump-tl-file.o
GENERATE_OBJECTS=${OBJ}/generate.o
COMMON_OBJECTS=${OBJ}/tools.o ${OBJ}/crypto/rand_openssl.o ${OBJ}/crypto/rand_altern.o ${OBJ}/crypto/err_openssl.o ${OBJ}/crypto/err_altern.o
OBJ_C=${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS} ${TLD_OBJECTS}
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJ_C}))
DEPENDENCE_LIST=${DEPENDENCE}
INCLUDE=-I. -I${srcdir}
CC=$(WIN32_DEV_TOP)/mingw/bin/gcc
.SUFFIXES:
.SUFFIXES: .c .h .o
all: ${LIB_LIST}
create_dirs_and_headers: ${DIR_LIST} ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h
create_dirs: ${DIR_LIST}
dump-tl: ${EXE}/dump-tl-file
#include ${srcdir}/Makefile.tl-parser
${DIR_LIST}:
@test -d $@ || mkdir -p $@
-include ${DEPENDENCE_LIST}
${TGL_OBJECTS}: ${AUTO}/constants.h ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h ${AUTO}/auto-fetch-ds.h ${AUTO}/auto-free-ds.h ${AUTO}/auto-store-ds.h ${AUTO}/auto-print-ds.h
${OBJ_C}: ${OBJ}/%.o: ${srcdir}/%.c | create_dirs
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${TGL_OBJECTS_AUTO}: ${OBJ}/auto/%.o: ${AUTO}/%.c | create_dirs
${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${LIB}/libtgl.a: ${TGL_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS_AUTO}
rm -f $@ && ar ruv $@ $^
${LIB}/libtgl.dll: ${TGL_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS_AUTO}
${CC} -shared -o $@ $^ ${LINK_FLAGS}
${EXE}/generate: ${GENERATE_OBJECTS} ${COMMON_OBJECTS}
${CC} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@
${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -e $@ ${AUTO}/scheme.tl
${AUTO}/scheme.tl: ${srcdir}/scheme.tl ${srcdir}/encrypted_scheme.tl ${srcdir}/binlog.tl ${srcdir}/mtproto.tl ${srcdir}/append.tl | ${AUTO}
cat $^ > $@
${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -E ${AUTO}/scheme.tl 2> $@ || ( cat $@ && rm $@ && false )
${AUTO}/auto.c: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate ${AUTO}/scheme.tlo > $@
${AUTO}/auto-%.c: ${AUTO}/scheme.tlo ${EXE}/generate auto/constants.h ${AUTO}/auto-%.h | create_dirs_and_headers
${EXE}/generate -g $(patsubst ${AUTO}/auto-%.c,%,$@) ${AUTO}/scheme.tlo > $@ || ( rm $@ && false )
${AUTO}/auto-%.h: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) ${AUTO}/scheme.tlo > $@ || ( rm $@ && false )
${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/gen_constants_h.awk
awk -f ${srcdir}/gen_constants_h.awk < $< > $@
${EXE}/dump-tl-file: ${OBJ}/auto/auto.o ${TLD_OBJECTS}
${CC} ${OBJ}/auto/auto.o ${TLD_OBJECTS} ${LINK_FLAGS} -o $@
clean:
rm -rf ${DIR_LIST}

142
README.es
View file

@ -1,142 +0,0 @@
## Telegram messenger CLI [![Build Status](https://travis-ci.org/vysheng/tg.png)](https://travis-ci.org/vysheng/tg)
Interfaz de línea de comandos para: [Telegram](http://telegram.org). Usa interfaz readline.
### Documentación del API y el protocolo
La documentación del APi de Telegram está disponible aquí: http://core.telegram.org/api
La documentación del protocolo MTproto está disponible aquí: http://core.telegram.org/mtproto
### Instalación
Clona el Repositorio GitHub
$ git clone https://github.com/vysheng/tg.git && cd tg
o descarga y descomprime el zip
$ wget https://github.com/vysheng/tg/archive/master.zip -O tg-master.zip
$ unzip tg-master.zip && cd tg-master
#### Linux
Librerías requeridas: readline openssl y (si desea usar config) libconfig y liblua.
Si no deseas usarlo, pasa las siguientes opciones --disable-libconfig y --disable-liblua respectivamente.
En Ubuntu usa:
$ sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev
En gentoo:
$ sudo emerge -av sys-libs/readline dev-libs/libconfig dev-libs/openssl dev-lang/lua
En Fedora:
$ sudo yum install lua-devel openssl-devel libconfig-devel readline-devel
Por defecto Makefile utiliza liblua5.2 de ubuntu. Si utilizas una versión diferente de liblua o linux, tienes que ejecutar el script ./configure o recibirás un error de compilación extraño.
Entonces
$ ./configure
$ make
#### Mac OS X
El cliente depende de [librería readline](http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html) y [libconfig](http://www.hyperrealm.com/libconfig/), las cuales no están incluídas en OS X por defecto. Debes instalar estas librerías de forma manual, usando por ejemplo [Homebrew](http://brew.sh/).
$ brew install libconfig
$ brew install readline
$ brew install lua
$ export CFLAGS="-I/usr/local/include -I/usr/local/Cellar/readline/6.2.4/include"
$ export LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/readline/6.2.4/lib"
$ ./configure && make
Gracias a [@jfontan](https://github.com/vysheng/tg/issues/3#issuecomment-28293731) por esta solución.
#### FreeBSD
Instalar estos puertos:
* devel/libconfig
* devel/libexecinfo
Entonces construir:
$ env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
$ make
#### Otros UNIX
Si logras ejecutarlo en otros UNIX, por favor házmelo saber.
### Uso
./telegram -k <clave-servidor-público>
Por defecto la clave pública se almacena en la misma carpeta con el nombre tg-server.pub o en /etc/telegram/server.pub, si no lo es, indica dónde encontrarlo:
./telegram -k tg-server.pub
El Cliente soporta completamiento con TAB e historial de comandos.
Peer se refiere al nombre del contacto o de diálogo y se puede acceder por completamiento con Tab.
Para los contactos de usuario el peer es el Nombre <guión bajo> Apellido con todos los espacios cambiados a guiones bajos.
Para los chats es su título con todos los espacios cambiados a guiones bajos.
Para los chats encriptados es <marca de exclamación> <guión bajo> Nombre <guión bajo> Apellido con todos los espacios cambiados a guiones bajos.
Si dos o más peers tienen el mismo nombre, una almohadilla y un número es añadido al nombre. (por ejemplo A_B,A_B#1,A_B#2 y así sucesivamente).
### Comandos soportados
#### Mensajería
* **msg** \<peer\> texto - envía el mensaje a este usuario.
* **fwd** \<usuario\> \<numero-mensaje\> - reenviar un mensaje al usuario. Puedes ver los número de mensajes iniciando el Cliente con -N.
* **chat_with_peer** \<peer\> - inicia un chat con este usuario. /exit o /quit para salir de este modo.
* **add_contact** \<numero-teléfono\> \<nombre\> \<apellido\> - intenta añadir este contacto a la lista de contactos.
* **rename_contact** \<usuario\> \<nombre\> \<apellido\> - intenta renombrar el contacto. Si tienes otro dispositivo será una pelea.
* **mark_read** \<peer\> - marca todos los mensajes como recibidos de ese usuario.
#### Multimedia
* **send_photo** \<peer\> \<nombre-archivo-foto\> - manda una foto al usuario.
* **send_video** \<peer\> \<nombre-archivo-video\> - envia un video al usuario.
* **send_text** \<peer\> \<nombre-archivo-texto> - envia un archivo de texto como un mensaje en plano.
* **load_photo**/load_video/load_video_thumb \<numero-mensaje\> - carga foto/video indicado del directorio de descarga.
* **view_photo**/view_video/view_video_thumb \<numero-mensaje\> - carga foto/video indicado del directorio de descarga y lo abre con el visor por defecto del sistema.
#### Opciones de chat de grupo
* **chat_info** \<chat\> - imprime información del chat.
* **chat_add_user** \<chat\> \<usuario\> - agrega un usuario al chat.
* **chat_del_user** \<chat\> \<usuario\> - elimina un usuario del chat.
* **rename_chat** \<chat\> \<nuevo-nombre\> - cambia el nombre al chat.
#### Search
* **search** \<peer\> patrón - busca el patrón indicado en los mensajes con ese usuario.
* **global_search** patrón - busca el patrón indicado en todos los mensajes.
#### Chat secreto
* **create_secret_chat** \<user\> - crea un chat secreto con el usuario indicado.
* **visualize_key** \<secret_chat\> - Muestra la clave de cifrado. Debes compararla con la del otro usuario.
#### Estadísticas e información varia.
* **user_info** \<user\> - muestra información sobre el usuario.
* **history** \<peer\> [limit] - muestra el historial (y la marca como leído). Limite por defecto = 40.
* **dialog_list** - muestra información acerca del dialogo
* **contact_list** - muestra información acerca de tu lista de contactos.
* **suggested_contacts** - muestra información sobre sus contactos, tiene un máximo de amigos comunes.
* **stats** - solo para depuración.
* **show_license** - muestra la licencia GPLv2.
* **help** - imprime esta ayuda.

423
README.md
View file

@ -1,144 +1,339 @@
## Telegram messenger CLI [![Build Status](https://travis-ci.org/vysheng/tg.png)](https://travis-ci.org/vysheng/tg)
Telegram-Purple Unofficial (Beta)
=================================
Command-line interface for [Telegram](http://telegram.org). Uses readline interface.
Telegram-purple is a Libpurple protocol plugin that adds support for the Telegram messenger.
### API, Protocol documentation
I keep getting many questions about this plugin in my E-mail, so I've created a [telegram group chat](https://goo.gl/VudXys) for
telegram-purple related discussions or questions.
Documentation for Telegram API is available here: http://core.telegram.org/api
Installation
------------
Documentation for MTproto protocol is available here: http://core.telegram.org/mtproto
If you are just interested in using the plugin you probably want to use one of the following binary distributions. Please note that I do not control most of those package sources and the version may lag behind.
### Installation
Clone GitHub Repository
git clone https://github.com/vysheng/tg.git && cd tg
or download and extract zip
wget https://github.com/vysheng/tg/archive/master.zip -O tg-master.zip
unzip tg-master.zip && cd tg-master
#### Linux and BSDs
Install libs: readline or libedit, openssl and (if you want to use config) libconfig and liblua.
If you do not want to use them pass options --disable-libconfig and --disable-liblua respectively.
On ubuntu use:
sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev
On gentoo:
sudo emerge -av sys-libs/readline dev-libs/libconfig dev-libs/openssl dev-lang/lua
On Fedora:
sudo yum install lua-devel openssl-devel libconfig-devel readline-devel
On FreeBSD:
pkg install libconfig libexecinfo lua52
On OpenBSD:
pkg_add libconfig libexecinfo lua
Then,
./configure
make
#### Mac OS X
The client depends on [readline library](http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html) and [libconfig](http://www.hyperrealm.com/libconfig/), which are not included in OS X by default. You have to install these libraries manually, e.g. using [Homebrew](http://brew.sh/).
brew install libconfig
brew install readline
brew install lua
export CFLAGS="-I/usr/local/include -I/usr/local/Cellar/readline/6.2.4/include"
export LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/readline/6.2.4/lib"
./configure && make
Thanks to [@jfontan](https://github.com/vysheng/tg/issues/3#issuecomment-28293731) for this solution.
If your platform is not supported or you want to contribute by testing or development, scroll down to "Building form Source".
Install these ports:
#### OSX (Adium)
* devel/libconfig
* devel/libexecinfo
* lang/lua52
1. Download and execute the [Telegram-Adium bundle] (https://github.com/majn/telegram-purple/releases/download/v1.3.0/telegram-adium-1.3.0.AdiumLibpurplePlugin.zip)
2. Restart Adium
Then build:
#### Windows
env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LUA=/usr/local/bin/lua52 LUA_INCLUDE=-I/usr/local/include/lua52 LUA_LIB=-llua-5.2 ./configure
make
Eion Robb provides a binary for Windows users:
#### Other UNIX
1. Download and execute the setup from http://eion.robbmob.com/telegram/
2. Restart Pidgin
If you manage to launch it on other UNIX, please let me know.
#### Fedora (22, 23)
### Usage
The package is available in the Fedora 22 and 23 testing repositories:
./telegram -k <public-server-key>
By default public key is stored in the same folder named tg-server.pub or in /etc/telegram/server.pub, if it's not, specify where to find it:
dnf config-manager --set-enabled updates-testing
dnf install purple-telegram
./telegram -k tg-server.pub
Client support TAB completion and command history.
#### Arch Linux (AUR)
Peer refers to the name of the contact or dialog and can be accessed by TAB completion.
For user contacts peer name is Name <underscore> Lastname with all spaces changed to underscores.
For chats it is it's title with all spaces changed to underscores
For encrypted chats it is <Exсlamation mark> <underscore> Name <underscore> Lastname with all spaces changed to underscores.
https://aur.archlinux.org/packages/telegram-purple/
If two or more peers have same name, <sharp>number is appended to the name. (for example A_B, A_B#1, A_B#2 and so on)
### Supported commands
#### Messaging
#### Debian
* **msg** \<peer\> Text - sends message to this peer
* **fwd** \<user\> \<msg-seqno\> - forward message to user. You can see message numbers starting client with -N
* **chat_with_peer** \<peer\> starts one on one chat session with this peer. /exit or /quit to end this mode.
* **add_contact** \<phone-number\> \<first-name\> \<last-name\> - tries to add contact to contact-list by phone
* **rename_contact** \<user\> \<first-name\> \<last-name\> - tries to rename contact. If you have another device it will be a fight
* **mark_read** \<peer\> - mark read all received messages with peer
At the time of writing, the package hasn't been accepted yet.
Please first check if it's already available to you: `sudo apt-get install telegram-purple`
#### Multimedia
If this doesn't work because the package doesn't exist (yet), please build it from source.
* **send_photo** \<peer\> \<photo-file-name\> - sends photo to peer
* **send_video** \<peer\> \<video-file-name\> - sends video to peer
* **send_text** \<peer\> \<text-file-name> - sends text file as plain messages
* **load_photo**/load_video/load_video_thumb \<msg-seqno\> - loads photo/video to download dir
* **view_photo**/view_video/view_video_thumb \<msg-seqno\> - loads photo/video to download dir and starts system default viewer
#### Group chat options
Building From Source
--------------------
* **chat_info** \<chat\> - prints info about chat
* **chat_add_user** \<chat\> \<user\> - add user to chat
* **chat_del_user** \<chat\> \<user\> - remove user from chat
* **rename_chat** \<chat\> \<new-name\>
* **create_group_chat** \<user\> \<chat topic\> - creates a groupchat with user, use chat_add_user to add more users
Below, you will find the instructions for how to build the libpurple protocol plugin from source.
#### Search
#### 1. Clone
* **search** \<peer\> pattern - searches pattern in messages with peer
* **global_search** pattern - searches pattern in all messages
This repository has submodules, so you need to clone recursively.
#### Secret chat
* **create_secret_chat** \<user\> - creates secret chat with this user
* **visualize_key** \<secret_chat\> - prints visualization of encryption key. You should compare it to your partner's one
git clone --recursive https://github.com/majn/telegram-purple
cd telegram-purple
#### Stats and various info
* **user_info** \<user\> - prints info about user
* **history** \<peer\> [limit] - prints history (and marks it as read). Default limit = 40
* **dialog_list** - prints info about your dialogs
* **contact_list** - prints info about users in your contact list
* **suggested_contacts** - print info about contacts, you have max common friends
* **stats** - just for debugging
* **show_license** - prints contents of GPLv2
* **help** - prints this help
#### 1b. Cloning if you're a packager
If you are unsure about whether you need this, then you are not a
packager and don't have any use for this.
If you need an "orig-tarball", it can be generated by `make dist`. Note
that this automatically generates an appropriate version number like
`1.2.4-58-g8e3cebf`. You can truncate the git suffix (`-g8e3cebf`). If
the `-58` part exists, it means that you're using a development
version, which is probably not what you want. If you still want to
package this, please leave the commit number (i.e., `58`) intact, as
this indicates that this version is in fact much further than just
`1.2.4`.
#### 2. Fetch all dependencies
##### Fedora
sudo dnf install gcc gettext libgcrypt-devel libwebp-devel libpurple-devel zlib-devel
##### Debian / Ubuntu
We are working on a Debian package! Please first check if it's already available to you: `sudo apt-get install telegram-purple`
If the above works, then you should stop here: It is now installed.
If the above fails: Don't worry, just continue building it by yourself. Next you need to install these dependencies:
sudo apt-get install libgcrypt20-dev libpurple-dev libwebp-dev gettext build-essential
##### OpenSUSE
sudo zypper install gcc glib glib-devel libpurple libpurple-devel zlib-devel libwebp-devel
And the development files for gcrypt, probably `gcrypt-devel` or something. (FIXME)
#### 3. Compile and install
If libwebp is not available, you can disable sticker support by calling ./configure --disable-libweb instead.
Please note that this is usually not necessary.
./configure
make
sudo make install
Pulling Updates
---------------
This repository contains submodules, and a simple pull just won't be enough to update all the submodules files. Pull new changes with:
git pull
git submodule sync # just in case the configuration has changed
git submodule update --recursive
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.
#### Buddy List
Like in the official Telegram apps, the displayed buddy list consists of all active conversations.
##### Foreign Users
Foreign users, like for example people you only know through a group chat but never had any conversation with, will not be part of your buddy list by default. You can add those users to the buddy list by clicking on "Add contact..." in the users context menu.
#### 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.
##### 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](https://en.wikipedia.org/wiki/Emoji)). 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.
#### Code-Tags
Since 1.3.0 it is possible to write messages in monospaced fonts using the markdown backtick syntax.
##### Example
``` if (true) {
// do smth
}```
##### Result
if (true) {
// do smth
}
Building the Adium Plugin
-------------------------
Compiling with XCode is a little bit problematic, since it requires you to compile Adium first to get the necessary framework files. My advice is to just use the [prebuilt bundle](https://github.com/majn/telegram-purple/releases), but if you really want to do it, follow these steps:
1. Get the Adium source, compile it with XCode and copy the build output into telegram-adium/Frameworks/Adium. It should contain at least Adium.framework, AdiumLibpurple.framework and AIUitilies.framework
2. Open the Adium source code, go to ./Frameworks and copy libglib.framework and libpurple.framework into telegram-adium/Frameworks/Adium
3. Build the tgl submodule and delete libtgl.so from libs/ (it should only contain libtgl.a)
4. Install libwebp, libgcrypt and gnupg with homebrew:
brew install webp
brew install libgcrypt libgpg-error
5. If you already downloaded libwebp/libgcrypt in previous builds make sure that the binaries are up-to-date
brew update
brew upgrade webp libgcrypt
6. Install with homebrew and move it into the appropriate directory so that XCode can find them. Note that the versions might differ, use the one that is
mkdir -p ./telegram-adium/Frameworks/Adium
cp /usr/local/Cellar/webp/0.4.3/lib/libwebp.a ./telegram-adium/Frameworks
cp /usr/local/Cellar/libgcrypt/1.6.4/lib/libgcrypt.20.dylib ./telegram-adium/Frameworks/Adium
cp /usr/local/Cellar/libgpg-error/1.20_1/lib/libgpg-error.0.dylib ./telegram-adium/Frameworks/Adium
7. Update the paths in the dylibs, to assure that the resulting binary will load them form within the bundle.
cd ./telegram-adium/Frameworks/Adium
install_name_tool -id "@loader_path/../Resources/libgcrypt.20.dylib" ./libgcrypt.20.dylib
install_name_tool -id "@loader_path/../Resources/libgpg-error.0.dylib" ./libgpg-error.0.dylib
install_name_tool -change "/usr/local/lib/libgpg-error.0.dylib" "@loader_path/../Resources/libgpg-error.0.dylib" ./libgcrypt.20.dylib
7. Build the XCode-Project and execute the created bundle
Building the Debian Package
---------------------------
If you just need a `.deb`, simply do:
sudo apt-get install debhelper
git checkout debian-master
git submodule update --recursive
fakeroot ./debian/rules binary
And you're done! The `.deb` is in the directory at which you started.
To show some info about it, try this:
dpkg --info telegram-purple_*.deb
`debian-master` always points to a version that was submitted to Debian. (Note that this doesn't exist yet, as we haven't released to Debian yet.)
`debian-develop` is the candidate for the next submission.
#### Debian Maintainers ####
If you're a maintainer (if you're not sure, then you aren't a
maintainer), you need to produce a lot more files than that.
Here's how you can generate a `.orig.tar.gz`:
make dist
Note that these are incompatible with the old `debian/genorigtar.sh`
tarballs, and can't be made compatible easily. If you need the tarball
from "back then", see the documentation there.
This command requires the original tar to exist (and will fail otherwise,
although the error message will be misleading) will build all further files,
specifically `.debian.tar.xz`, `.dsc`, `.deb`, and `.changes`:
dpkg-buildpackage
For the upload, you should use `pbuilder` and similar to build the package
in a more minimalistic environment. That covers the official part of the work-flow.
Of course, you can call small parts of the build process directly, in order to avoid
overhead like rebuilding. For example, if you only need the `.debian.tar.xz`
and `.dsc` files, do this:
make dist
false # Move tar to parent directory, by hand
dpkg-source -b .
Discussion / Help
-----------------
#### Custom pubkeys
As we want to avoid OpenSSL, it has become necessary to replace the PEM file format. This means that if you use a custom pubkey (which you really REALLY shouldn't be doing), you have to adapt, sorry.
We no longer ship `tg-server.pub` (old format), but instead `tg-server.tglpub` (new format). If you have a `.pub` and want to continue using telegram-purple, please use this (hopefully highly portable) tool: [pem2bignum](https://github.com/BenWiederhake/pem2bignum)
You can also write your own conversion tool if you prefer. The format is really simple:
1. `e`, the public exponent, encoded as big endian 32 bit fixed length (e.g. `0x00 01 00 01` for 65537)
2. `n_len`, the length of `n` in bytes, encoded as big endian 32 bit fixed length (e.g. `0x00 00 01 00` for a 2048-bit = 256-byte key)
3. `n_raw`, the raw modulus, encoded as big endian, using the previously indicated length (e.g. `0xC1 50 02 3E [248 bytes omitted] 21 79 25 1F` in the case of telegram's public RSA key.)
If you are interested in developing a non-OpenSSL-licensed converter, look into [insane-triangle-banana](https://github.com/BenWiederhake/insane-triangle-banana).
FAQ
---
- I receive pictures in a chat, but they aren't showing up
* A: Make sure that you don't have a plugin like "Conversation Colors" that strips HTML from messages and removes the pictures.
- I receive RPC_CALL_FAIL_401: SESSION REVOKED
* A: This basically means your session has been terminated but the program
doesn't handle terminated sessions properly yet. You have to clean the
~/.purple/telegram-purple/$PHONENUMBER directory to fix this issue.
For Arch Linux users that use Bitlbee you can find this directory in
`/var/lib/bitlbee/purple/telegram-purple/`
#### Group chat
Telegram group chat for telegram-purple or libtgl related discussions or questions:
- https://goo.gl/VudXys
Submitting Bug Reports
----------------------
**IMPORTANT**: if you report bugs PLEASE make sure to always **include as much information as possible**. This should always include **at least the telegram-purple version and (if possible) commit**, where you got telegram-purple from (Source build, package repository, etc.), the Pidgin version (if you use a different messenger please state that too!) and your OS Version.
If you describe some issue please be as precise as possible. Descriptions like "XY doesn't work" will not help me. Describe what you are doing what kind of issue you are experiencing: "If I click on X, Y happens, but instead I would expect Z to happen".
For error reports please include the application logs. To get Pidgin to print a log, [start it from command line, specifying the -d option](https://developer.pidgin.im/wiki/GetABacktrace#TheEasyWay). **ATTENTION**: This log will contain personal information like your phone number, message content or contact or chat names. If you plan on uploading it somewhere public mask those entries in the log.
Bug reports regarding crashes should include a backtrace if possible, there is extended documentation available on [how to get a backtrace for crashes](https://developer.pidgin.im/wiki/GetABacktrace)
Empathy / libtelepathy
----------------------
Empathy doesn't natively support libpurple plugins since its based on libtelepathy, but there is a compatibillity layer called telepathy-haze that can be used to execute libpurple
plugins. This means that you can basically run this plugin thanks to telepathy-haze but you will usually get less features and worse usability compared to real libpurple clients. If you use Empathy (or anything else based on libtelepathy) I recommend [telepathy-morse](https://projects.kde.org/projects/playground/network/telepathy/telepathy-morse/repository) which is a connection manager written specifically for your messenger.
Authors
-------
Telegram-Purple was written by:
- Matthias Jentsch <mtthsjntsch@gmail.com>
- Vitaly Valtman
- Ben Wiederhake <Ben.Wiederhake@gmail.com>
- Christopher Althaus <althaus.christopher@gmail.com>
Acknowledgements
----------------
This software is based on the library [Libtgl](https://github.com/vysheng/tgl), which was written by Vitaly Valtman <mail@vysheng.ru> and others, see (https://github.com/vysheng/tgl/)

16
autogen.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e
autoreconf
(
cd po
export XGETTEXT="xgettext -kP_:1,2"
intltool-update --pot
## Translations are managed at https://www.transifex.com/telegram-purple-developers/telegram-purple/
## To update the .po files, download it from there, since intltool, msginit, and transifex produce slightly different files, and I'd like to avoid gigantic git diffs that only change indentation or similar things.
)
test -r Makefile || (echo "Autoreconf didn't create Makefile?!"; exit 1)
make --quiet build-nsi

614
ax_lua.m4
View file

@ -1,614 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_lua.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_LUA[([MINIMUM-VERSION], [TOO-BIG-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])]
# AX_LUA_HEADERS[([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])]
# AX_LUA_LIBS[([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])]
# AX_LUA_READLINE[([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])]
#
# DESCRIPTION
#
# Detect a Lua interpreter, optionally specifying a minimum and maximum
# version number. Set up important Lua paths, such as the directories in
# which to install scripts and modules (shared libraries).
#
# Also detect Lua headers and libraries. The Lua version contained in the
# header is checked to match the Lua interpreter version exactly. When
# searching for Lua libraries, the version number is used as a suffix.
# This is done with the goal of supporting multiple Lua installs (5.1 and
# 5.2 side-by-side).
#
# A note on compatibility with previous versions: This file has been
# mostly rewritten for serial 18. Most developers should be able to use
# these macros without needing to modify configure.ac. Care has been taken
# to preserve each macro's behavior, but there are some differences:
#
# 1) AX_WITH_LUA is deprecated; it now expands to the exact same thing as
# AX_PROG_LUA with no arguments.
#
# 2) AX_LUA_HEADERS now checks that the version number defined in lua.h
# matches the interpreter version. AX_LUA_HEADERS_VERSION is therefore
# unnecessary, so it is deprecated and does not expand to anything.
#
# 3) The configure flag --with-lua-suffix no longer exists; the user
# should instead specify the LUA precious variable on the command line.
# See the AX_PROG_LUA description for details.
#
# Please read the macro descriptions below for more information.
#
# This file was inspired by Andrew Dalke's and James Henstridge's
# python.m4 and Tom Payne's, Matthieu Moy's, and Reuben Thomas's ax_lua.m4
# (serial 17). Basically, this file is a mash-up of those two files. I
# like to think it combines the best of the two!
#
# AX_PROG_LUA: Search for the Lua interpreter, and set up important Lua
# paths. Adds precious variable LUA, which may contain the path of the Lua
# interpreter. If LUA is blank, the user's path is searched for an
# suitable interpreter.
#
# If MINIMUM-VERSION is supplied, then only Lua interpreters with a
# version number greater or equal to MINIMUM-VERSION will be accepted. If
# TOO-BIG- VERSION is also supplied, then only Lua interpreters with a
# version number greater or equal to MINIMUM-VERSION and less than
# TOO-BIG-VERSION will be accepted.
#
# Version comparisons require the AX_COMPARE_VERSION macro, which is
# provided by ax_compare_version.m4 from the Autoconf Archive.
#
# The Lua version number, LUA_VERSION, is found from the interpreter, and
# substituted. LUA_PLATFORM is also found, but not currently supported (no
# standard representation).
#
# Finally, the macro finds four paths:
#
# luadir Directory to install Lua scripts.
# pkgluadir $luadir/$PACKAGE
# luaexecdir Directory to install Lua modules.
# pkgluaexecdir $luaexecdir/$PACKAGE
#
# These paths a found based on $prefix, $exec_prefix, Lua's package.path,
# and package.cpath. The first path of package.path beginning with $prefix
# is selected as luadir. The first path of package.cpath beginning with
# $exec_prefix is used as luaexecdir. This should work on all reasonable
# Lua installations. If a path cannot be determined, a default path is
# used. Of course, the user can override these later when invoking make.
#
# luadir Default: $prefix/share/lua/$LUA_VERSION
# luaexecdir Default: $exec_prefix/lib/lua/$LUA_VERSION
#
# These directories can be used by Automake as install destinations. The
# variable name minus 'dir' needs to be used as a prefix to the
# appropriate Automake primary, e.g. lua_SCRIPS or luaexec_LIBRARIES.
#
# If an acceptable Lua interpreter is found, then ACTION-IF-FOUND is
# performed, otherwise ACTION-IF-NOT-FOUND is preformed. If ACTION-IF-NOT-
# FOUND is blank, then it will default to printing an error. To prevent
# the default behavior, give ':' as an action.
#
# AX_LUA_HEADERS: Search for Lua headers. Requires that AX_PROG_LUA be
# expanded before this macro. Adds precious variable LUA_INCLUDE, which
# may contain Lua specific include flags, e.g. -I/usr/include/lua5.1. If
# LUA_INCLUDE is blank, then this macro will attempt to find suitable
# flags.
#
# LUA_INCLUDE can be used by Automake to compile Lua modules or
# executables with embedded interpreters. The *_CPPFLAGS variables should
# be used for this purpose, e.g. myprog_CPPFLAGS = $(LUA_INCLUDE).
#
# This macro searches for the header lua.h (and others). The search is
# performed with a combination of CPPFLAGS, CPATH, etc, and LUA_INCLUDE.
# If the search is unsuccessful, then some common directories are tried.
# If the headers are then found, then LUA_INCLUDE is set accordingly.
#
# The paths automatically searched are:
#
# * /usr/include/luaX.Y
# * /usr/include/lua/X.Y
# * /usr/include/luaXY
# * /usr/local/include/luaX.Y
# * /usr/local/include/lua-X.Y
# * /usr/local/include/lua/X.Y
# * /usr/local/include/luaXY
#
# (Where X.Y is the Lua version number, e.g. 5.1.)
#
# The Lua version number found in the headers is always checked to match
# the Lua interpreter's version number. Lua headers with mismatched
# version numbers are not accepted.
#
# If headers are found, then ACTION-IF-FOUND is performed, otherwise
# ACTION-IF-NOT-FOUND is performed. If ACTION-IF-NOT-FOUND is blank, then
# it will default to printing an error. To prevent the default behavior,
# set the action to ':'.
#
# AX_LUA_LIBS: Search for Lua libraries. Requires that AX_PROG_LUA be
# expanded before this macro. Adds precious variable LUA_LIB, which may
# contain Lua specific linker flags, e.g. -llua5.1. If LUA_LIB is blank,
# then this macro will attempt to find suitable flags.
#
# LUA_LIB can be used by Automake to link Lua modules or executables with
# embedded interpreters. The *_LIBADD and *_LDADD variables should be used
# for this purpose, e.g. mymod_LIBADD = $(LUA_LIB).
#
# This macro searches for the Lua library. More technically, it searches
# for a library containing the function lua_load. The search is performed
# with a combination of LIBS, LIBRARY_PATH, and LUA_LIB.
#
# If the search determines that some linker flags are missing, then those
# flags will be added to LUA_LIB.
#
# If libraries are found, then ACTION-IF-FOUND is performed, otherwise
# ACTION-IF-NOT-FOUND is performed. If ACTION-IF-NOT-FOUND is blank, then
# it will default to printing an error. To prevent the default behavior,
# set the action to ':'.
#
# AX_LUA_READLINE: Search for readline headers and libraries. Requires the
# AX_LIB_READLINE macro, which is provided by ax_lib_readline.m4 from the
# Autoconf Archive.
#
# If a readline compatible library is found, then ACTION-IF-FOUND is
# performed, otherwise ACTION-IF-NOT-FOUND is performed.
#
# LICENSE
#
# Copyright (c) 2013 Tim Perkins <tprk77@gmail.com>
# Copyright (c) 2013 Reuben Thomas <rrt@sc3d.org>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 21
dnl =========================================================================
dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl =========================================================================
AC_DEFUN([AX_PROG_LUA],
[
dnl Make LUA a precious variable.
AC_ARG_VAR([LUA], [The Lua interpreter, e.g. /usr/bin/lua5.1])
dnl Find a Lua interpreter.
m4_define_default([_AX_LUA_INTERPRETER_LIST],
[lua lua5.2 lua52 lua5.1 lua51 lua50])
m4_if([$1], [],
[ dnl No version check is needed. Find any Lua interpreter.
AS_IF([test "x$LUA" = 'x'],
[AC_PATH_PROGS([LUA], [_AX_LUA_INTERPRETER_LIST], [:])])
ax_display_LUA='lua'
dnl At least check if this is a Lua interpreter.
AC_MSG_CHECKING([if $LUA is a Lua interpreter])
_AX_LUA_CHK_IS_INTRP([$LUA],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([no])
AC_MSG_ERROR([not a Lua interpreter])
])
],
[ dnl A version check is needed.
AS_IF([test "x$LUA" != 'x'],
[ dnl Check if this is a Lua interpreter.
AC_MSG_CHECKING([if $LUA is a Lua interpreter])
_AX_LUA_CHK_IS_INTRP([$LUA],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([no])
AC_MSG_ERROR([not a Lua interpreter])
])
dnl Check the version.
m4_if([$2], [],
[_ax_check_text="whether $LUA version >= $1"],
[_ax_check_text="whether $LUA version >= $1, < $2"])
AC_MSG_CHECKING([$_ax_check_text])
_AX_LUA_CHK_VER([$LUA], [$1], [$2],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([no])
AC_MSG_ERROR([version is out of range for specified LUA])])
ax_display_LUA=$LUA
],
[ dnl Try each interpreter until we find one that satisfies VERSION.
m4_if([$2], [],
[_ax_check_text="for a Lua interpreter with version >= $1"],
[_ax_check_text="for a Lua interpreter with version >= $1, < $2"])
AC_CACHE_CHECK([$_ax_check_text],
[ax_cv_pathless_LUA],
[ for ax_cv_pathless_LUA in _AX_LUA_INTERPRETER_LIST none; do
test "x$ax_cv_pathless_LUA" = 'xnone' && break
_AX_LUA_CHK_IS_INTRP([$ax_cv_pathless_LUA], [], [continue])
_AX_LUA_CHK_VER([$ax_cv_pathless_LUA], [$1], [$2], [break])
done
])
dnl Set $LUA to the absolute path of $ax_cv_pathless_LUA.
AS_IF([test "x$ax_cv_pathless_LUA" = 'xnone'],
[LUA=':'],
[AC_PATH_PROG([LUA], [$ax_cv_pathless_LUA])])
ax_display_LUA=$ax_cv_pathless_LUA
])
])
AS_IF([test "x$LUA" = 'x:'],
[ dnl Run any user-specified action, or abort.
m4_default([$4], [AC_MSG_ERROR([cannot find suitable Lua interpreter])])
],
[ dnl Query Lua for its version number.
AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
[ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
sed "s|^Lua \(.*\)|\1|" | \
grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
])
AS_IF([test "x$ax_cv_lua_version" = 'x'],
[AC_MSG_ERROR([invalid Lua version number])])
AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | sed 's|\.||'`])
dnl The following check is not supported:
dnl At times (like when building shared libraries) you may want to know
dnl which OS platform Lua thinks this is.
AC_CACHE_CHECK([for $ax_display_LUA platform], [ax_cv_lua_platform],
[ax_cv_lua_platform=`$LUA -e "print('unknown')"`])
AC_SUBST([LUA_PLATFORM], [$ax_cv_lua_platform])
dnl Use the values of $prefix and $exec_prefix for the corresponding
dnl values of LUA_PREFIX and LUA_EXEC_PREFIX. These are made distinct
dnl variables so they can be overridden if need be. However, the general
dnl consensus is that you shouldn't need this ability.
AC_SUBST([LUA_PREFIX], ['${prefix}'])
AC_SUBST([LUA_EXEC_PREFIX], ['${exec_prefix}'])
dnl Lua provides no way to query the script directory, and instead
dnl provides LUA_PATH. However, we should be able to make a safe educated
dnl guess. If the built-in search path contains a directory which is
dnl prefixed by $prefix, then we can store scripts there. The first
dnl matching path will be used.
AC_CACHE_CHECK([for $ax_display_LUA script directory],
[ax_cv_lua_luadir],
[ AS_IF([test "x$prefix" = 'xNONE'],
[ax_lua_prefix=$ac_default_prefix],
[ax_lua_prefix=$prefix])
dnl Initialize to the default path.
ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION"
dnl Try to find a path with the prefix.
_AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
[ dnl Fix the prefix.
_ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
])
])
AC_SUBST([luadir], [$ax_cv_lua_luadir])
AC_SUBST([pkgluadir], [\${luadir}/$PACKAGE])
dnl Lua provides no way to query the module directory, and instead
dnl provides LUA_PATH. However, we should be able to make a safe educated
dnl guess. If the built-in search path contains a directory which is
dnl prefixed by $exec_prefix, then we can store modules there. The first
dnl matching path will be used.
AC_CACHE_CHECK([for $ax_display_LUA module directory],
[ax_cv_lua_luaexecdir],
[ AS_IF([test "x$exec_prefix" = 'xNONE'],
[ax_lua_exec_prefix=$ax_lua_prefix],
[ax_lua_exec_prefix=$exec_prefix])
dnl Initialize to the default path.
ax_cv_lua_luaexecdir="$LUA_EXEC_PREFIX/lib/lua/$LUA_VERSION"
dnl Try to find a path with the prefix.
_AX_LUA_FND_PRFX_PTH([$LUA],
[$ax_lua_exec_prefix], [package.cpathd])
AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
[ dnl Fix the prefix.
_ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
sed "s,^$_ax_strip_prefix,$LUA_EXEC_PREFIX,"`
])
])
AC_SUBST([luaexecdir], [$ax_cv_lua_luaexecdir])
AC_SUBST([pkgluaexecdir], [\${luaexecdir}/$PACKAGE])
dnl Run any user specified action.
$3
])
])
dnl AX_WITH_LUA is now the same thing as AX_PROG_LUA.
AC_DEFUN([AX_WITH_LUA],
[
AC_MSG_WARN([[$0 is deprecated, please use AX_PROG_LUA]])
AX_PROG_LUA
])
dnl =========================================================================
dnl _AX_LUA_CHK_IS_INTRP(PROG, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
dnl =========================================================================
AC_DEFUN([_AX_LUA_CHK_IS_INTRP],
[
dnl Just print _VERSION because all Lua interpreters have this global.
AS_IF([$1 -e "print('Hello ' .. _VERSION .. '!')" &>/dev/null],
[$2], [$3])
])
dnl =========================================================================
dnl _AX_LUA_CHK_VER(PROG, MINIMUM-VERSION, [TOO-BIG-VERSION],
dnl [ACTION-IF-TRUE], [ACTION-IF-FALSE])
dnl =========================================================================
AC_DEFUN([_AX_LUA_CHK_VER],
[
_ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
sed "s|^Lua \(.*\)|\1|" | grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
AS_IF([test "x$_ax_test_ver" = 'x'],
[_ax_test_ver='0'])
AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
m4_if([$3], [], [],
[ AS_IF([$ax_compare_version],
[AX_COMPARE_VERSION([$_ax_test_ver], [lt], [$3])])
])
AS_IF([$ax_compare_version], [$4], [$5])
])
dnl =========================================================================
dnl _AX_LUA_FND_PRFX_PTH(PROG, PREFIX, LUA-PATH-VARIABLE)
dnl =========================================================================
AC_DEFUN([_AX_LUA_FND_PRFX_PTH],
[
dnl Invokes the Lua interpreter PROG to print the path variable
dnl LUA-PATH-VARIABLE, usually package.path or package.cpath. Paths are
dnl then matched against PREFIX. The first path to begin with PREFIX is set
dnl to ax_lua_prefixed_path.
ax_lua_prefixed_path=''
_ax_package_paths=`$1 -e 'print($3)' 2>/dev/null | sed 's|;|\n|g'`
dnl Try the paths in order, looking for the prefix.
for _ax_package_path in $_ax_package_paths; do
dnl Copy the path, up to the use of a Lua wildcard.
_ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'`
_ax_reassembled=''
for _ax_path_part in $_ax_path_parts; do
echo "$_ax_path_part" | grep '\?' >/dev/null && break
_ax_reassembled="$_ax_reassembled/$_ax_path_part"
done
dnl Check the path against the prefix.
_ax_package_path=$_ax_reassembled
if echo "$_ax_package_path" | grep "^$2" >/dev/null; then
dnl Found it.
ax_lua_prefixed_path=$_ax_package_path
break
fi
done
])
dnl =========================================================================
dnl AX_LUA_HEADERS([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl =========================================================================
AC_DEFUN([AX_LUA_HEADERS],
[
dnl Check for LUA_VERSION.
AC_MSG_CHECKING([if LUA_VERSION is defined])
AS_IF([test "x$LUA_VERSION" != 'x'],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot check Lua headers without knowing LUA_VERSION])
])
dnl Make LUA_INCLUDE a precious variable.
AC_ARG_VAR([LUA_INCLUDE], [The Lua includes, e.g. -I/usr/include/lua5.1])
dnl Some default directories to search.
LUA_SHORT_VERSION=`echo "$LUA_VERSION" | sed 's|\.||'`
m4_define_default([_AX_LUA_INCLUDE_LIST],
[ /usr/include/lua$LUA_VERSION \
/usr/include/lua/$LUA_VERSION \
/usr/include/lua$LUA_SHORT_VERSION \
/usr/local/include/lua$LUA_VERSION \
/usr/local/include/lua-$LUA_VERSION \
/usr/local/include/lua/$LUA_VERSION \
/usr/local/include/lua$LUA_SHORT_VERSION \
])
dnl Try to find the headers.
_ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
AC_CHECK_HEADERS([lua.h lualib.h lauxlib.h luaconf.h])
CPPFLAGS=$_ax_lua_saved_cppflags
dnl Try some other directories if LUA_INCLUDE was not set.
AS_IF([test "x$LUA_INCLUDE" = 'x' &&
test "x$ac_cv_header_lua_h" != 'xyes'],
[ dnl Try some common include paths.
for _ax_include_path in _AX_LUA_INCLUDE_LIST; do
test ! -d "$_ax_include_path" && continue
AC_MSG_CHECKING([for Lua headers in])
AC_MSG_RESULT([$_ax_include_path])
AS_UNSET([ac_cv_header_lua_h])
AS_UNSET([ac_cv_header_lualib_h])
AS_UNSET([ac_cv_header_lauxlib_h])
AS_UNSET([ac_cv_header_luaconf_h])
_ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$_ax_include_path"
AC_CHECK_HEADERS([lua.h lualib.h lauxlib.h luaconf.h])
CPPFLAGS=$_ax_lua_saved_cppflags
AS_IF([test "x$ac_cv_header_lua_h" = 'xyes'],
[ LUA_INCLUDE="-I$_ax_include_path"
break
])
done
])
AS_IF([test "x$ac_cv_header_lua_h" = 'xyes'],
[ dnl Make a program to print LUA_VERSION defined in the header.
dnl TODO This probably shouldn't be a runtime test.
AC_CACHE_CHECK([for Lua header version],
[ax_cv_lua_header_version],
[ _ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
AC_RUN_IFELSE(
[ AC_LANG_SOURCE([[
#include <lua.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char ** argv)
{
if(argc > 1) printf("%s", LUA_VERSION);
exit(EXIT_SUCCESS);
}
]])
],
[ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
sed "s|^Lua \(.*\)|\1|" | \
grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
],
[ax_cv_lua_header_version='unknown'])
CPPFLAGS=$_ax_lua_saved_cppflags
])
dnl Compare this to the previously found LUA_VERSION.
AC_MSG_CHECKING([if Lua header version matches $LUA_VERSION])
AS_IF([test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"],
[ AC_MSG_RESULT([yes])
ax_header_version_match='yes'
],
[ AC_MSG_RESULT([no])
ax_header_version_match='no'
])
])
dnl Was LUA_INCLUDE specified?
AS_IF([test "x$ax_header_version_match" != 'xyes' &&
test "x$LUA_INCLUDE" != 'x'],
[AC_MSG_ERROR([cannot find headers for specified LUA_INCLUDE])])
dnl Test the final result and run user code.
AS_IF([test "x$ax_header_version_match" = 'xyes'], [$1],
[m4_default([$2], [AC_MSG_ERROR([cannot find Lua includes])])])
])
dnl AX_LUA_HEADERS_VERSION no longer exists, use AX_LUA_HEADERS.
AC_DEFUN([AX_LUA_HEADERS_VERSION],
[
AC_MSG_WARN([[$0 is deprecated, please use AX_LUA_HEADERS]])
])
dnl =========================================================================
dnl AX_LUA_LIBS([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl =========================================================================
AC_DEFUN([AX_LUA_LIBS],
[
dnl TODO Should this macro also check various -L flags?
dnl Check for LUA_VERSION.
AC_MSG_CHECKING([if LUA_VERSION is defined])
AS_IF([test "x$LUA_VERSION" != 'x'],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot check Lua libs without knowing LUA_VERSION])
])
dnl Make LUA_LIB a precious variable.
AC_ARG_VAR([LUA_LIB], [The Lua library, e.g. -llua5.1])
AS_IF([test "x$LUA_LIB" != 'x'],
[ dnl Check that LUA_LIBS works.
_ax_lua_saved_libs=$LIBS
LIBS="$LIBS $LUA_LIB"
AC_SEARCH_LIBS([lua_load], [],
[_ax_found_lua_libs='yes'],
[_ax_found_lua_libs='no'])
LIBS=$_ax_lua_saved_libs
dnl Check the result.
AS_IF([test "x$_ax_found_lua_libs" != 'xyes'],
[AC_MSG_ERROR([cannot find libs for specified LUA_LIB])])
],
[ dnl First search for extra libs.
_ax_lua_extra_libs=''
_ax_lua_saved_libs=$LIBS
LIBS="$LIBS $LUA_LIB"
AC_SEARCH_LIBS([exp], [m])
AC_SEARCH_LIBS([dlopen], [dl])
LIBS=$_ax_lua_saved_libs
AS_IF([test "x$ac_cv_search_exp" != 'xno' &&
test "x$ac_cv_search_exp" != 'xnone required'],
[_ax_lua_extra_libs="$_ax_lua_extra_libs $ac_cv_search_exp"])
AS_IF([test "x$ac_cv_search_dlopen" != 'xno' &&
test "x$ac_cv_search_dlopen" != 'xnone required'],
[_ax_lua_extra_libs="$_ax_lua_extra_libs $ac_cv_search_dlopen"])
dnl Try to find the Lua libs.
_ax_lua_saved_libs=$LIBS
LIBS="$LIBS $LUA_LIB"
AC_SEARCH_LIBS([lua_load],
[ lua$LUA_VERSION \
lua$LUA_SHORT_VERSION \
lua-$LUA_VERSION \
lua-$LUA_SHORT_VERSION \
lua],
[_ax_found_lua_libs='yes'],
[_ax_found_lua_libs='no'],
[$_ax_lua_extra_libs])
LIBS=$_ax_lua_saved_libs
AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
test "x$ac_cv_search_lua_load" != 'xnone required'],
[LUA_LIB="$ac_cv_search_lua_load $_ax_lua_extra_libs"])
])
dnl Test the result and run user code.
AS_IF([test "x$_ax_found_lua_libs" = 'xyes'], [$1],
[m4_default([$2], [AC_MSG_ERROR([cannot find Lua libs])])])
])
dnl =========================================================================
dnl AX_LUA_READLINE([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl =========================================================================
AC_DEFUN([AX_LUA_READLINE],
[
AX_LIB_READLINE
AS_IF([test "x$ac_cv_header_readline_readline_h" != 'x' &&
test "x$ac_cv_header_readline_history_h" != 'x'],
[ LUA_LIBS_CFLAGS="-DLUA_USE_READLINE $LUA_LIBS_CFLAGS"
$1
],
[$2])
])

1850
binlog.c

File diff suppressed because it is too large Load diff

150
binlog.h
View file

@ -1,150 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __BINLOG_H__
#define __BINLOG_H__
#include "structures.h"
#define LOG_START 0x8948329a
#define LOG_AUTH_KEY 0x984932aa
#define LOG_DEFAULT_DC 0x95382908
#define LOG_OUR_ID 0x8943211a
#define LOG_DC_SIGNED 0x234f9893
#define LOG_DC_SALT 0x92192ffa
#define LOG_DH_CONFIG 0x8983402b
#define LOG_ENCR_CHAT_KEY 0x894320aa
#define LOG_ENCR_CHAT_SEND_ACCEPT 0x12ab01c4
#define LOG_ENCR_CHAT_SEND_CREATE 0xab091e24
#define LOG_ENCR_CHAT_DELETED 0x99481230
#define LOG_ENCR_CHAT_WAITING 0x7102100a
#define LOG_ENCR_CHAT_REQUESTED 0x9011011a
#define LOG_ENCR_CHAT_OK 0x7612ce13
#define CODE_binlog_new_user 0xe04f30de
#define CODE_binlog_user_delete 0xf7a27c79
#define CODE_binlog_set_user_access_token 0x1349f615
#define CODE_binlog_set_user_phone 0x5d3afde2
#define CODE_binlog_set_user_friend 0x75a7ec5a
#define CODE_binlog_dc_option 0x08c0ef19
#define CODE_binlog_user_full_photo 0xfaa35824
#define CODE_binlog_user_blocked 0xb2dea7cd
#define CODE_binlog_set_user_full_name 0x4ceb4cf0
#define CODE_binlog_encr_chat_delete 0xb9d33f87
#define CODE_binlog_encr_chat_requested 0xf57d1ea2
#define CODE_binlog_set_encr_chat_access_hash 0xe5612bb3
#define CODE_binlog_set_encr_chat_date 0x54f16911
#define CODE_binlog_set_encr_chat_state 0x76a6e45b
#define CODE_binlog_encr_chat_accepted 0x4627e926
#define CODE_binlog_set_encr_chat_key 0x179df2d4
#define CODE_binlog_set_dh_params 0x20ba46bc
#define CODE_binlog_encr_chat_init 0x939cd1c7
#define CODE_binlog_set_pts 0x844e4c1c
#define CODE_binlog_set_qts 0x3cf22b79
#define CODE_binlog_set_date 0x33dfe392
#define CODE_binlog_set_seq 0xb9294837
#define CODE_binlog_chat_create 0xbaa75791
#define CODE_binlog_chat_change_flags 0x1e494031
#define CODE_binlog_set_chat_title 0x7dd9bea8
#define CODE_binlog_set_chat_photo 0xb4ea1fd2
#define CODE_binlog_set_chat_date 0x78d1114e
#define CODE_binlog_set_chat_version 0xa5d3504f
#define CODE_binlog_set_chat_admin 0x1e7cea04
#define CODE_binlog_set_chat_participants 0x3a29d335
#define CODE_binlog_chat_full_photo 0x6cca6629
#define CODE_binlog_add_chat_participant 0x63345108
#define CODE_binlog_del_chat_participant 0x82d1f0ee
#define CODE_binlog_create_message_text 0x269acd5b
#define CODE_binlog_create_message_text_fwd 0xa3d864cd
#define CODE_binlog_create_message_service 0xbbe5e94b
#define CODE_binlog_create_message_service_fwd 0xea9c57ae
#define CODE_binlog_create_message_media 0x62a92d19
#define CODE_binlog_create_message_media_fwd 0xbefdc462
#define CODE_binlog_send_message_text 0x31cfd652
#define CODE_binlog_set_unread 0x21d4c909
#define CODE_binlog_set_message_sent 0xc335282b
#define CODE_binlog_set_msg_id 0xf3285b6a
#define CODE_binlog_create_message_media_encr 0x19cd7c9d
#define CODE_binlog_create_message_service_encr 0x8b4b9395
#define CODE_binlog_delete_msg 0xa1d6ab6d
void *alloc_log_event (int l);
void replay_log (void);
void add_log_event (const int *data, int l);
void write_binlog (void);
void bl_do_set_auth_key_id (int num, unsigned char *buf);
void bl_do_dc_option (int id, int l1, const char *name, int l2, const char *ip, int port);
void bl_do_set_our_id (int id);
void bl_do_new_user (int id, const char *f, int fl, const char *l, int ll, long long access_token, const char *p, int pl, int contact);
void bl_do_user_delete (struct user *U);
void bl_do_set_user_profile_photo (struct user *U, long long photo_id, struct file_location *big, struct file_location *small);
void bl_do_set_user_name (struct user *U, const char *f, int fl, const char *l, int ll);
void bl_do_set_user_access_token (struct user *U, long long access_token);
void bl_do_set_user_phone (struct user *U, const char *p, int pl);
void bl_do_set_user_friend (struct user *U, int friend);
void bl_do_set_user_full_photo (struct user *U, const int *start, int len);
void bl_do_set_user_blocked (struct user *U, int blocked);
void bl_do_set_user_real_name (struct user *U, const char *f, int fl, const char *l, int ll);
void bl_do_encr_chat_delete (struct secret_chat *U);
void bl_do_encr_chat_requested (struct secret_chat *U, long long access_hash, int date, int admin_id, int user_id, unsigned char g_key[], unsigned char nonce[]);
void bl_do_set_encr_chat_access_hash (struct secret_chat *U, long long access_hash);
void bl_do_set_encr_chat_date (struct secret_chat *U, int date);
void bl_do_set_encr_chat_state (struct secret_chat *U, enum secret_chat_state state);
void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[], const unsigned char nonce[], long long key_fingerprint);
void bl_do_set_encr_chat_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint);
void bl_do_encr_chat_init (int id, int user_id, unsigned char random[], unsigned char g_a[]);
void bl_do_dc_signed (int id);
void bl_do_set_working_dc (int num);
void bl_do_set_dh_params (int root, unsigned char prime[], int version);
void bl_do_set_pts (int pts);
void bl_do_set_qts (int qts);
void bl_do_set_seq (int seq);
void bl_do_set_date (int date);
void bl_do_create_chat (struct chat *C, int y, const char *s, int l, int users_num, int date, int version, struct file_location *big, struct file_location *small);
void bl_do_chat_forbid (struct chat *C, int on);
void bl_do_set_chat_title (struct chat *C, const char *s, int l);
void bl_do_set_chat_photo (struct chat *C, struct file_location *big, struct file_location *small);
void bl_do_set_chat_date (struct chat *C, int date);
void bl_do_set_chat_set_in_chat (struct chat *C, int on);
void bl_do_set_chat_version (struct chat *C, int version, int user_num);
void bl_do_set_chat_admin (struct chat *C, int admin);
void bl_do_set_chat_participants (struct chat *C, int version, int user_num, struct chat_user *users);
void bl_do_set_chat_full_photo (struct chat *U, const int *start, int len);
void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, int date);
void bl_do_chat_del_user (struct chat *C, int version, int user);
void bl_do_create_message_text (int msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s);
void bl_do_create_message_text_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, int l, const char *s);
void bl_do_create_message_service (int msg_id, int from_id, int to_type, int to_id, int date, const int *data, int len);
void bl_do_create_message_service_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, const int *data, int len);
void bl_do_create_message_media (int msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s, const int *data, int len);
void bl_do_create_message_media_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, int l, const char *s, const int *data, int len);
void bl_do_create_message_media_encr (long long msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s, const int *data, int len, const int *data2, int len2);
void bl_do_create_message_service_encr (long long msg_id, int from_id, int to_type, int to_id, int date, const int *data, int len);
void bl_do_send_message_text (long long msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s);
void bl_do_set_unread (struct message *M, int unread);
void bl_do_set_message_sent (struct message *M);
void bl_do_set_msg_id (struct message *M, int id);
void bl_do_delete_msg (struct message *M);
#endif

View file

@ -1,10 +0,0 @@
log.peer peer_type:int peer_id:int = log.Peer;
log.dc num:int hostname:string ip:string port:int = log.Event;
log.dcRenum old_num:int new_num:int = log.Event;
log.authKey dc:int key:bytes key_id:long = log.Event;
log.signIn dc:int id:int = log.Event;
log.user id:int flags:int access_hash:long first_name:string last_name:string real_first_name:string real_last_name:string phone:string photo:log.Photo photo_id:long photo_big:log.FileLocation photo_small:long.FileLocation = log.Event;

45
commit.h.gen Executable file
View file

@ -0,0 +1,45 @@
#!/bin/sh
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Ben Wiederhake 2016
set -e
if ! (command -v git && git status) >/dev/null 2>&1
then
if test -r commit.h
then
echo "No git available. Assuming everything is up-to-date."
exit 0
else
echo >&2 "No git available. Can't reconstruct commit.h"
exit 1
fi
fi
GIT_COMMIT=`git rev-parse HEAD | cut -c1-10`
if grep -scq "${GIT_COMMIT}" commit.h
then
echo "commit.h is up-to-date"
else
echo "Refresh commit.h"
echo "#ifndef GIT_COMMIT" > commit.h
echo "# define GIT_COMMIT \"${GIT_COMMIT}\"" >> commit.h
echo "#endif" >> commit.h
fi

View file

@ -1,88 +1,45 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
/* Define the gettext package to be used */
#undef GETTEXT_PACKAGE
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <lauxlib.h> header file. */
#undef HAVE_LAUXLIB_H
/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
#undef HAVE_LIBGCRYPT
/* Define to 1 if you have the `config' library (-lconfig). */
#undef HAVE_LIBCONFIG
/* Define to 1 if you have the `rt' library (-lrt). */
#undef HAVE_LIBRT
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `webp' library (-lwebp). */
#undef HAVE_LIBWEBP
/* Define to 1 if you have the `edit' library (-ledit). */
#undef HAVE_LIBEDIT
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the `z' library (-lz). */
/* Define to 1 if you have `z' library (-lz) */
#undef HAVE_LIBZ
/* Define to 1 if you have the <luaconf.h> header file. */
#undef HAVE_LUACONF_H
/* Define to 1 if you have the <lualib.h> header file. */
#undef HAVE_LUALIB_H
/* Define to 1 if you have the <lua.h> header file. */
#undef HAVE_LUA_H
/* Define to 1 if you have the <mach/mach.h> header file. */
#undef HAVE_MACH_MACH_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@ -98,27 +55,18 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@ -140,38 +88,11 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Use custom prog name */
#undef PROG_NAME
/* Use libedit */
#undef READLINE_EDIT
/* Use gnu libreadline */
#undef READLINE_GNU
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* use lua */
#undef USE_LUA
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to rpl_realloc if the replacement function should be used. */
#undef realloc
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t

116
config.h.mingw Normal file
View file

@ -0,0 +1,116 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres, Eion Robb 2014-2015
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define the gettext package to be used */
#define GETTEXT_PACKAGE "telegram-purple"
#define ENABLE_NLS 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
#define HAVE_LIBGCRYPT 1
/* Define to 1 if you have the `rt' library (-lrt). */
/* #undef HAVE_LIBRT */
/* Define to 1 if you have the `webp' library (-lwebp). */
#define HAVE_LIBWEBP 1
/* Define to 1 if you have `z' library (-lz) */
#define HAVE_LIBZ 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef HAVE_NETINET_IN_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "telegram-purple"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME PACKAGE_NAME
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

185
config.h.tgl.mingw Normal file
View file

@ -0,0 +1,185 @@
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres, Eion Robb 2014-2015
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* disable extf queries */
/* #undef DISABLE_EXTF */
/* Use libevent v1 */
/* #undef EVENT_V1 */
/* Use libevent v2 */
/* #undef EVENT_V2 */
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define to 1 if you have the `endpwent' function. */
/* #undef HAVE_ENDPWENT */
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef HAVE_EXECINFO_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `event' library (-levent). */
/* #undef HAVE_LIBEVENT */
/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
#define HAVE_LIBGCRYPT 1
/* Define to 1 if you have `z' library (-lz) */
#define HAVE_LIBZ 1
/* Define to 1 if you have the <mach/mach.h> header file. */
/* #undef HAVE_MACH_MACH_H */
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef HAVE_NETINET_IN_H */
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 1
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
/* Define to 1 if you have the `socket' function. */
/* #undef HAVE_SOCKET */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <termios.h> header file. */
/* #undef HAVE_TERMIOS_H */
/* Define to 1 if you have the `uname' function. */
/* #undef HAVE_UNAME */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if the system has the `__builtin_bswap32' built-in function */
#define HAVE___BUILTIN_BSWAP32 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "telegram-cli"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "telegram-cli 1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "telegram-cli"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* avoid OpenSSL entirely, use libgcrypt instead (this can't read *.pub files,
though.) */
#define TGL_AVOID_OPENSSL 1
/* fixed for correct valgrind work */
/* #undef VALGRIND_FIXES */
/* Define to `int' if <sys/types.h> doesn't define. */
#define gid_t int
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
/* Define to rpl_realloc if the replacement function should be used. */
/* #undef realloc */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `int' if <sys/types.h> doesn't define. */
#define uid_t int

View file

@ -1,66 +0,0 @@
# This is an empty config file
# Feel free to put something here
default_profile = "binlog";
test_dc1 = {
config_directory = ".telegram/test_dc1";
test = true;
msg_num = true;
binlog_enabled = true;
};
binlog = {
config_directory = ".telegram/binlog";
test = false;
msg_num = true;
binlog_enabled = true;
log_level = 2;
};
binlog_mts = {
config_directory = ".telegram/binlog_mts";
test = false;
msg_num = true;
binlog_enabled = true;
log_level = 2;
};
mega = {
config_directory = ".telegram/mega";
test = false;
msg_num = true;
binlog_enabled = true;
log_level = 2;
};
new = {
config_directory = ".telegram/new";
test = false;
msg_num = true;
};
production = {
config_directory = ".telegram/production";
test = false;
msg_num = true;
};
test = {
config_directory = ".telegram/test";
test = true;
msg_num = true;
};
test1 = {
config_directory = ".telegram/test1";
msg_num = true;
binlog_enabled = true;
};
test2 = {
config_directory = ".telegram/test2";
msg_num = true;
binlog_enabled = true;
};

2997
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,115 +1,101 @@
AC_PREREQ([2.68])
AC_INIT([telegram], [0.1])
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([telegram-purple], [1.3.1])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
m4_include([ax_lua.m4])
m4_include([m4_ax_check_openssl.m4])
m4_include([m4_ax_check_zlib.m4])
m4_include([m4_ax_pkg_config.m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
# BSD locations for headers and libraries from packages, Linux locations for self-compiled stuff.
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
AC_CHECK_LIB([rt], [clock_gettime])
# Checks for libraries.
AC_CHECK_LIB([m], [sqrt])
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_SEARCH_LIBS([backtrace], [execinfo])
AC_CHECK_LIB([z], [inflate])
AC_CHECK_LIB([crypto], [AES_set_encrypt_key])
EXTRA_LIBS=""
AC_ARG_ENABLE([gcrypt],
AS_HELP_STRING([--disable-gcrypt], [Disable gcrypt, use OpenSSL instead. DO NOT DISTRIBUTE BINARIES!]))
AC_CHECK_LIB([readline], [rl_save_prompt],
[
AC_DEFINE([READLINE_GNU], [1], [Use gnu libreadline])
[ EXTRA_LIBS="${EXTRA_LIBS} -lreadline" ; ]
],
[
AC_SEARCH_LIBS([tgetnum], [ncursesw ncurses curses])
AC_CHECK_LIB([edit], [rl_set_prompt])
AC_DEFINE([READLINE_EDIT], [1], [Use libedit])
[ EXTRA_LIBS="${EXTRA_LIBS} -ledit" ; ]
]
)
AS_IF([test "x$enable_gcrypt" != "xno"], [
# Even though tgl/configure will do this too, still call our own libgcrypt check to assure that -lgcrypt is added to our makefile
AC_CHECK_LIB([gcrypt], [gcry_mpi_snatch], [], [
echo "no libgcrypt >= 1.60 found. If its not available try --disable-gcrypt to link against openssl, but in that case YOU MAY NOT REDISTRIBUTE THE BINARY due to licensing restrictions."
exit -1
])
AC_SUBST([CRYPTO_FLAG], [--disable-openssl])
], [
AX_CHECK_OPENSSL([], [No openssl found.])
])
AC_MSG_CHECKING([for libconfig])
AC_ARG_ENABLE(libconfig,[--enable-libconfig/--disable-libconfig],
[
if test "x$enableval" = "xno" ; then
AC_MSG_RESULT([disabled])
else
AX_CHECK_ZLIB(, [AC_MSG_ERROR([No zlib found])])
PKG_CHECK_MODULES([PURPLE], [purple])
AC_MSG_CHECKING([for libwebp])
AC_ARG_ENABLE([libwebp],
AS_HELP_STRING([--disable-libwebp], [Disable libwebp, stickers won't be displayed in the chat]))
AS_IF([test "x$enable_libwebp" != "xno"], [
AC_MSG_RESULT([enabled])
AC_CHECK_LIB([config],[config_init],[],AC_MSG_ERROR([No libconfig found. Try --disable-libconfig]))
fi
],[
AC_MSG_RESULT([enabled])
AC_CHECK_LIB([config],[config_init],[],AC_MSG_ERROR([No libconfig found. Try --disable-libconfig]))
AC_CHECK_LIB([webp], [WebPDecodeRGBA], [], [AC_MSG_ERROR([no libwebp found, try --disable-libwebp, but stickers won't be displayed in the chat])])
])
AC_MSG_CHECKING([for liblua])
AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
[
if test "x$enableval" = "xno" ; then
AC_MSG_RESULT([disabled])
else
AC_MSG_RESULT([enabled])
AX_PROG_LUA([],[],
[
AX_LUA_HEADERS([],[AC_MSG_ERROR([No lua headers found. Try --disable-liblua])])
AX_LUA_LIBS([],[AC_MSG_ERROR([No lua libs found. Try --disable-liblua])])
[EXTRA_LIBS="${EXTRA_LIBS} ${LUA_LIB}" ; ]
[CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ; ]
AC_DEFINE(USE_LUA,1,[use lua])
],
[
AC_MSG_ERROR([No lua found. Try --disable-liblua])
])
fi
],[
AC_MSG_RESULT([enabled])
AX_PROG_LUA([],[],
[
AX_LUA_HEADERS([],[AC_MSG_ERROR([No lua headers found. Try --disable-liblua])])
AX_LUA_LIBS([],[AC_MSG_ERROR([No lua libs found. Try --disable-liblua])])
[EXTRA_LIBS="${EXTRA_LIBS} ${LUA_LIB}" ; ]
[CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ; ]
AC_DEFINE(USE_LUA,1,[use lua])
],
[
AC_MSG_ERROR([No lua found. Try --disable-liblua])
])
])
AC_ARG_ENABLE([icons],
AS_HELP_STRING([--disable-icons], [Unsupported option. Use 'make noicon_install' instead.]))
AS_IF([test "x$enable_icons" == "xno"], [
AC_MSG_ERROR([--disable-icons is now obsolete. Please use 'make noicon_install' for the same effect.])
])
#check for custom prog name
AC_ARG_WITH(progname,[--with-progname=<name>],
[
if test "x$with_progname" = "xno" ; then
AC_MSG_RESULT([default])
elif test "x$with_progname" = "xyes" ; then
AC_MSG_RESULT([default])
else
AC_MSG_RESULT(["$with_progname"])
AC_DEFINE_UNQUOTED([PROG_NAME], ["$with_progname"], [Use custom prog name])
fi
],[
AC_MSG_RESULT([default])
])
# Checks for header files.
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_C_INLINE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([alarm endpwent memset memmove mkdir select socket strdup strndup uname])
AC_CHECK_FUNCS([memset strdup])
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_CPPFLAGS)
AC_SUBST(PURPLE_LIBS)
AC_ARG_ENABLE([translation],
AS_HELP_STRING([--disable-translation], [Disable gettext translation]))
AS_IF([test "x$enable_translation" != "xno"], [
AC_CHECK_PROG(CHECK_GETTEXT, msgfmt, "yes", "no", $PATH)
if test x"$CHECK_GETTEXT" != x"yes" ; then
AC_MSG_ERROR([no gettext found, use --disable-translation if you dont need it.])
fi
AC_SUBST(MSGFMT_PATH, $(which msgfmt))
])
# Define the domain name for the translated words
GETTEXT_PACKAGE=$PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
AC_SUBST(EXTRA_LIBS)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -1,383 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef CONSTANTS_H
#define CONSTANTS_H
#define CODE_bool_false 0xbc799737
#define CODE_bool_true 0x997275b5
#define CODE_vector 0x1cb5c415
#define CODE_error 0xc4b9f9bb
#define CODE_null 0x56730bcc
#define CODE_input_peer_empty 0x7f3b18ea
#define CODE_input_peer_self 0x7da07ec9
#define CODE_input_peer_contact 0x1023dbe8
#define CODE_input_peer_foreign 0x9b447325
#define CODE_input_peer_chat 0x179be863
#define CODE_input_user_empty 0xb98886cf
#define CODE_input_user_self 0xf7c1b13f
#define CODE_input_user_contact 0x86e94f65
#define CODE_input_user_foreign 0x655e74ff
#define CODE_input_phone_contact 0xf392b7f4
#define CODE_input_file 0xf52ff27f
#define CODE_input_media_empty 0x9664f57f
#define CODE_input_media_uploaded_photo 0x2dc53a7d
#define CODE_input_media_photo 0x8f2ab2ec
#define CODE_input_media_geo_point 0xf9c44144
#define CODE_input_media_contact 0xa6e45987
#define CODE_input_media_uploaded_video 0x4847d92a
#define CODE_input_media_uploaded_thumb_video 0xe628a145
#define CODE_input_media_video 0x7f023ae6
#define CODE_input_chat_photo_empty 0x1ca48f57
#define CODE_input_chat_uploaded_photo 0x94254732
#define CODE_input_chat_photo 0xb2e1bf08
#define CODE_input_geo_point_empty 0xe4c123d6
#define CODE_input_geo_point 0xf3b7acc9
#define CODE_input_photo_empty 0x1cd7bf0d
#define CODE_input_photo 0xfb95c6c4
#define CODE_input_video_empty 0x5508ec75
#define CODE_input_video 0xee579652
#define CODE_input_file_location 0x14637196
#define CODE_input_video_file_location 0x3d0364ec
#define CODE_input_photo_crop_auto 0xade6b004
#define CODE_input_photo_crop 0xd9915325
#define CODE_input_app_event 0x770656a8
#define CODE_peer_user 0x9db1bc6d
#define CODE_peer_chat 0xbad0e5bb
#define CODE_storage_file_unknown 0xaa963b05
#define CODE_storage_file_jpeg 0x7efe0e
#define CODE_storage_file_gif 0xcae1aadf
#define CODE_storage_file_png 0xa4f63c0
#define CODE_storage_file_mp3 0x528a0677
#define CODE_storage_file_mov 0x4b09ebbc
#define CODE_storage_file_partial 0x40bc6f52
#define CODE_storage_file_mp4 0xb3cea0e4
#define CODE_storage_file_webp 0x1081464c
#define CODE_file_location_unavailable 0x7c596b46
#define CODE_file_location 0x53d69076
#define CODE_user_empty 0x200250ba
#define CODE_user_self 0x720535ec
#define CODE_user_contact 0xf2fb8319
#define CODE_user_request 0x22e8ceb0
#define CODE_user_foreign 0x5214c89d
#define CODE_user_deleted 0xb29ad7cc
#define CODE_user_profile_photo_empty 0x4f11bae1
#define CODE_user_profile_photo 0xd559d8c8
#define CODE_user_status_empty 0x9d05049
#define CODE_user_status_online 0xedb93949
#define CODE_user_status_offline 0x8c703f
#define CODE_chat_empty 0x9ba2d800
#define CODE_chat 0x6e9c9bc7
#define CODE_chat_forbidden 0xfb0ccc41
#define CODE_chat_full 0x630e61be
#define CODE_chat_participant 0xc8d7493e
#define CODE_chat_participants_forbidden 0xfd2bb8a
#define CODE_chat_participants 0x7841b415
#define CODE_chat_photo_empty 0x37c1011c
#define CODE_chat_photo 0x6153276a
#define CODE_message_empty 0x83e5de54
#define CODE_message 0x22eb6aba
#define CODE_message_forwarded 0x5f46804
#define CODE_message_service 0x9f8d60bb
#define CODE_message_media_empty 0x3ded6320
#define CODE_message_media_photo 0xc8c45a2a
#define CODE_message_media_video 0xa2d24290
#define CODE_message_media_geo 0x56e0d474
#define CODE_message_media_contact 0x5e7d2f39
#define CODE_message_media_unsupported 0x29632a36
#define CODE_message_action_empty 0xb6aef7b0
#define CODE_message_action_chat_create 0xa6638b9a
#define CODE_message_action_chat_edit_title 0xb5a1ce5a
#define CODE_message_action_chat_edit_photo 0x7fcb13a8
#define CODE_message_action_chat_delete_photo 0x95e3fbef
#define CODE_message_action_chat_add_user 0x5e3cfc4b
#define CODE_message_action_chat_delete_user 0xb2ae9b0c
#define CODE_dialog 0x214a8cdf
#define CODE_photo_empty 0x2331b22d
#define CODE_photo 0x22b56751
#define CODE_photo_size_empty 0xe17e23c
#define CODE_photo_size 0x77bfb61b
#define CODE_photo_cached_size 0xe9a734fa
#define CODE_video_empty 0xc10658a8
#define CODE_video 0x5a04a49f
#define CODE_geo_point_empty 0x1117dd5f
#define CODE_geo_point 0x2049d70c
#define CODE_auth_checked_phone 0xe300cc3b
#define CODE_auth_sent_code 0xefed51d9
#define CODE_auth_authorization 0xf6b673a4
#define CODE_auth_exported_authorization 0xdf969c2d
#define CODE_input_notify_peer 0xb8bc5b0c
#define CODE_input_notify_users 0x193b4417
#define CODE_input_notify_chats 0x4a95e84e
#define CODE_input_notify_all 0xa429b886
#define CODE_input_peer_notify_events_empty 0xf03064d8
#define CODE_input_peer_notify_events_all 0xe86a2c74
#define CODE_input_peer_notify_settings 0x46a2ce98
#define CODE_peer_notify_events_empty 0xadd53cb3
#define CODE_peer_notify_events_all 0x6d1ded88
#define CODE_peer_notify_settings_empty 0x70a68512
#define CODE_peer_notify_settings 0x8d5e11ee
#define CODE_wall_paper 0xccb03657
#define CODE_user_full 0x771095da
#define CODE_contact 0xf911c994
#define CODE_imported_contact 0xd0028438
#define CODE_contact_blocked 0x561bc879
#define CODE_contact_found 0xea879f95
#define CODE_contact_suggested 0x3de191a1
#define CODE_contact_status 0xaa77b873
#define CODE_chat_located 0x3631cf4c
#define CODE_contacts_foreign_link_unknown 0x133421f8
#define CODE_contacts_foreign_link_requested 0xa7801f47
#define CODE_contacts_foreign_link_mutual 0x1bea8ce1
#define CODE_contacts_my_link_empty 0xd22a1c60
#define CODE_contacts_my_link_requested 0x6c69efee
#define CODE_contacts_my_link_contact 0xc240ebd9
#define CODE_contacts_link 0xeccea3f5
#define CODE_contacts_contacts 0x6f8b8cb2
#define CODE_contacts_contacts_not_modified 0xb74ba9d2
#define CODE_contacts_imported_contacts 0xd1cd0a4c
#define CODE_contacts_blocked 0x1c138d15
#define CODE_contacts_blocked_slice 0x900802a1
#define CODE_contacts_found 0x566000e
#define CODE_contacts_suggested 0x5649dcc5
#define CODE_messages_dialogs 0x15ba6c40
#define CODE_messages_dialogs_slice 0x71e094f3
#define CODE_messages_messages 0x8c718e87
#define CODE_messages_messages_slice 0xb446ae3
#define CODE_messages_message_empty 0x3f4e0648
#define CODE_messages_message 0xff90c417
#define CODE_messages_stated_messages 0x969478bb
#define CODE_messages_stated_message 0xd07ae726
#define CODE_messages_sent_message 0xd1f4d35c
#define CODE_messages_chat 0x40e9002a
#define CODE_messages_chats 0x8150cbd8
#define CODE_messages_chat_full 0xe5d7d19c
#define CODE_messages_affected_history 0xb7de36f2
#define CODE_input_messages_filter_empty 0x57e2f66c
#define CODE_input_messages_filter_photos 0x9609a51c
#define CODE_input_messages_filter_video 0x9fc00e65
#define CODE_input_messages_filter_photo_video 0x56e9f0e4
#define CODE_update_new_message 0x13abdb3
#define CODE_update_message_i_d 0x4e90bfd6
#define CODE_update_read_messages 0xc6649e31
#define CODE_update_delete_messages 0xa92bfe26
#define CODE_update_restore_messages 0xd15de04d
#define CODE_update_user_typing 0x6baa8508
#define CODE_update_chat_user_typing 0x3c46cfe6
#define CODE_update_chat_participants 0x7761198
#define CODE_update_user_status 0x1bfbd823
#define CODE_update_user_name 0xda22d9ad
#define CODE_update_user_photo 0x95313b0c
#define CODE_update_contact_registered 0x2575bbb9
#define CODE_update_contact_link 0x51a48a9a
#define CODE_update_activation 0x6f690963
#define CODE_update_new_authorization 0x8f06529a
#define CODE_updates_state 0xa56c2a3e
#define CODE_updates_difference_empty 0x5d75a138
#define CODE_updates_difference 0xf49ca0
#define CODE_updates_difference_slice 0xa8fb1981
#define CODE_updates_too_long 0xe317af7e
#define CODE_update_short_message 0xd3f45784
#define CODE_update_short_chat_message 0x2b2fbd4e
#define CODE_update_short 0x78d4dec1
#define CODE_updates_combined 0x725b04c3
#define CODE_updates 0x74ae4240
#define CODE_photos_photos 0x8dca6aa5
#define CODE_photos_photos_slice 0x15051f54
#define CODE_photos_photo 0x20212ca8
#define CODE_upload_file 0x96a18d5
#define CODE_dc_option 0x2ec2a43c
#define CODE_config 0x2e54dd74
#define CODE_nearest_dc 0x8e1a1775
#define CODE_help_app_update 0x8987f311
#define CODE_help_no_app_update 0xc45a6536
#define CODE_help_invite_text 0x18cb9f78
#define CODE_messages_stated_messages_links 0x3e74f5c6
#define CODE_messages_stated_message_link 0xa9af2881
#define CODE_messages_sent_message_link 0xe9db4a3f
#define CODE_input_geo_chat 0x74d456fa
#define CODE_input_notify_geo_chat_peer 0x4d8ddec8
#define CODE_geo_chat 0x75eaea5a
#define CODE_geo_chat_message_empty 0x60311a9b
#define CODE_geo_chat_message 0x4505f8e1
#define CODE_geo_chat_message_service 0xd34fa24e
#define CODE_geochats_stated_message 0x17b1578b
#define CODE_geochats_located 0x48feb267
#define CODE_geochats_messages 0xd1526db1
#define CODE_geochats_messages_slice 0xbc5863e8
#define CODE_message_action_geo_chat_create 0x6f038ebc
#define CODE_message_action_geo_chat_checkin 0xc7d53de
#define CODE_update_new_geo_chat_message 0x5a68e3f7
#define CODE_wall_paper_solid 0x63117f24
#define CODE_update_new_encrypted_message 0x12bcbd9a
#define CODE_update_encrypted_chat_typing 0x1710f156
#define CODE_update_encryption 0xb4a2e88d
#define CODE_update_encrypted_messages_read 0x38fe25b7
#define CODE_encrypted_chat_empty 0xab7ec0a0
#define CODE_encrypted_chat_waiting 0x3bf703dc
#define CODE_encrypted_chat_requested 0xc878527e
#define CODE_encrypted_chat 0xfa56ce36
#define CODE_encrypted_chat_discarded 0x13d6dd27
#define CODE_input_encrypted_chat 0xf141b5e1
#define CODE_encrypted_file_empty 0xc21f497e
#define CODE_encrypted_file 0x4a70994c
#define CODE_input_encrypted_file_empty 0x1837c364
#define CODE_input_encrypted_file_uploaded 0x64bd0306
#define CODE_input_encrypted_file 0x5a17b5e5
#define CODE_input_encrypted_file_location 0xf5235d55
#define CODE_encrypted_message 0xed18c118
#define CODE_encrypted_message_service 0x23734b06
#define CODE_decrypted_message_layer 0x99a438cf
#define CODE_decrypted_message 0x1f814f1f
#define CODE_decrypted_message_service 0xaa48327d
#define CODE_decrypted_message_media_empty 0x89f5c4a
#define CODE_decrypted_message_media_photo 0x32798a8c
#define CODE_decrypted_message_media_video 0x4cee6ef3
#define CODE_decrypted_message_media_geo_point 0x35480a59
#define CODE_decrypted_message_media_contact 0x588a0a97
#define CODE_decrypted_message_action_set_message_t_t_l 0xa1733aec
#define CODE_messages_dh_config_not_modified 0xc0e24635
#define CODE_messages_dh_config 0x2c221edd
#define CODE_messages_sent_encrypted_message 0x560f8935
#define CODE_messages_sent_encrypted_file 0x9493ff32
#define CODE_input_file_big 0xfa4f0bb5
#define CODE_input_encrypted_file_big_uploaded 0x2dc173c8
#define CODE_update_chat_participant_add 0x3a0eeb22
#define CODE_update_chat_participant_delete 0x6e5f8c22
#define CODE_update_dc_options 0x8e5e9873
#define CODE_input_media_uploaded_audio 0x61a6d436
#define CODE_input_media_audio 0x89938781
#define CODE_input_media_uploaded_document 0x34e794bd
#define CODE_input_media_uploaded_thumb_document 0x3e46de5d
#define CODE_input_media_document 0xd184e841
#define CODE_message_media_document 0x2fda2204
#define CODE_message_media_audio 0xc6b68300
#define CODE_input_audio_empty 0xd95adc84
#define CODE_input_audio 0x77d440ff
#define CODE_input_document_empty 0x72f0eaae
#define CODE_input_document 0x18798952
#define CODE_input_audio_file_location 0x74dc404d
#define CODE_input_document_file_location 0x4e45abe9
#define CODE_decrypted_message_media_document 0xb095434b
#define CODE_decrypted_message_media_audio 0x6080758f
#define CODE_audio_empty 0x586988d8
#define CODE_audio 0x427425e7
#define CODE_document_empty 0x36f8c871
#define CODE_document 0x9efc6326
#define CODE_invoke_after_msg 0xcb9f372d
#define CODE_invoke_after_msgs 0x3dc4b4f0
#define CODE_invoke_with_layer1 0x53835315
#define CODE_auth_check_phone 0x6fe51dfb
#define CODE_auth_send_code 0x768d5f4d
#define CODE_auth_send_call 0x3c51564
#define CODE_auth_sign_up 0x1b067634
#define CODE_auth_sign_in 0xbcd51581
#define CODE_auth_log_out 0x5717da40
#define CODE_auth_reset_authorizations 0x9fab0d1a
#define CODE_auth_send_invites 0x771c1d97
#define CODE_auth_export_authorization 0xe5bfffcd
#define CODE_auth_import_authorization 0xe3ef9613
#define CODE_account_register_device 0x446c712c
#define CODE_account_unregister_device 0x65c55b40
#define CODE_account_update_notify_settings 0x84be5b93
#define CODE_account_get_notify_settings 0x12b3ad31
#define CODE_account_reset_notify_settings 0xdb7e1747
#define CODE_account_update_profile 0xf0888d68
#define CODE_account_update_status 0x6628562c
#define CODE_account_get_wall_papers 0xc04cfac2
#define CODE_users_get_users 0xd91a548
#define CODE_users_get_full_user 0xca30a5b1
#define CODE_contacts_get_statuses 0xc4a353ee
#define CODE_contacts_get_contacts 0x22c6aa08
#define CODE_contacts_import_contacts 0xda30b32d
#define CODE_contacts_search 0x11f812d8
#define CODE_contacts_get_suggested 0xcd773428
#define CODE_contacts_delete_contact 0x8e953744
#define CODE_contacts_delete_contacts 0x59ab389e
#define CODE_contacts_block 0x332b49fc
#define CODE_contacts_unblock 0xe54100bd
#define CODE_contacts_get_blocked 0xf57c350f
#define CODE_messages_get_messages 0x4222fa74
#define CODE_messages_get_dialogs 0xeccf1df6
#define CODE_messages_get_history 0x92a1df2f
#define CODE_messages_search 0x7e9f2ab
#define CODE_messages_read_history 0xb04f2510
#define CODE_messages_delete_history 0xf4f8fb61
#define CODE_messages_delete_messages 0x14f2dd0a
#define CODE_messages_restore_messages 0x395f9d7e
#define CODE_messages_received_messages 0x28abcb68
#define CODE_messages_set_typing 0x719839e9
#define CODE_messages_send_message 0x4cde0aab
#define CODE_messages_send_media 0xa3c85d76
#define CODE_messages_forward_messages 0x514cd10f
#define CODE_messages_get_chats 0x3c6aa187
#define CODE_messages_get_full_chat 0x3b831c66
#define CODE_messages_edit_chat_title 0xb4bc68b5
#define CODE_messages_edit_chat_photo 0xd881821d
#define CODE_messages_add_chat_user 0x2ee9ee9e
#define CODE_messages_delete_chat_user 0xc3c5cd23
#define CODE_messages_create_chat 0x419d9aee
#define CODE_updates_get_state 0xedd4882a
#define CODE_updates_get_difference 0xa041495
#define CODE_photos_update_profile_photo 0xeef579a0
#define CODE_photos_upload_profile_photo 0xd50f9c88
#define CODE_upload_save_file_part 0xb304a621
#define CODE_upload_get_file 0xe3a6cfb5
#define CODE_help_get_config 0xc4f9186b
#define CODE_help_get_nearest_dc 0x1fb33026
#define CODE_help_get_app_update 0xc812ac7e
#define CODE_help_save_app_log 0x6f02f748
#define CODE_help_get_invite_text 0xa4a95186
#define CODE_photos_get_user_photos 0xb7ee553c
#define CODE_invoke_with_layer2 0x289dd1f6
#define CODE_messages_forward_message 0x3f3f4f2
#define CODE_messages_send_broadcast 0x41bb0972
#define CODE_invoke_with_layer3 0xb7475268
#define CODE_geochats_get_located 0x7f192d8f
#define CODE_geochats_get_recents 0xe1427e6f
#define CODE_geochats_checkin 0x55b3e8fb
#define CODE_geochats_get_full_chat 0x6722dd6f
#define CODE_geochats_edit_chat_title 0x4c8e2273
#define CODE_geochats_edit_chat_photo 0x35d81a95
#define CODE_geochats_search 0xcfcdc44d
#define CODE_geochats_get_history 0xb53f7a68
#define CODE_geochats_set_typing 0x8b8a729
#define CODE_geochats_send_message 0x61b0044
#define CODE_geochats_send_media 0xb8f0deff
#define CODE_geochats_create_geo_chat 0xe092e16
#define CODE_invoke_with_layer4 0xdea0d430
#define CODE_invoke_with_layer5 0x417a57ae
#define CODE_invoke_with_layer6 0x3a64d54d
#define CODE_invoke_with_layer7 0xa5be56d3
#define CODE_messages_get_dh_config 0x26cf8950
#define CODE_messages_request_encryption 0xf64daf43
#define CODE_messages_accept_encryption 0x3dbc0415
#define CODE_messages_discard_encryption 0xedd923c5
#define CODE_messages_set_encrypted_typing 0x791451ed
#define CODE_messages_read_encrypted_history 0x7f4b690a
#define CODE_messages_send_encrypted 0xa9776773
#define CODE_messages_send_encrypted_file 0x9a901b66
#define CODE_messages_send_encrypted_service 0x32d439a4
#define CODE_messages_received_queue 0x55a5bb66
#define CODE_invoke_with_layer8 0xe9abd9fd
#define CODE_upload_save_big_file_part 0xde7b673d
#define CODE_init_connection 0x69796de9
#define CODE_invoke_with_layer9 0x76715a63
#define CODE_invoke_with_layer10 0x39620c41
#define CODE_invoke_with_layer11 0xa6b88fdf
#define CODE_invoke_with_layer12 0xdda60d3c
#endif

5
debian/changelog vendored
View file

@ -1,5 +0,0 @@
telegram-cli (0.1-1) unstable; urgency=low
* Initial release (Closes #737563)
-- Cleto Martín <cleto@debian.org> Mon, 03 Feb 2014 20:00:03 +0000

1
debian/clean vendored
View file

@ -1 +0,0 @@
Makefile

1
debian/compat vendored
View file

@ -1 +0,0 @@
9

36
debian/control vendored
View file

@ -1,36 +0,0 @@
Source: telegram-cli
Section: net
Priority: optional
Maintainer: Cleto Martín <cleto@debian.org>
Build-Depends: debhelper (>= 8.0.0),
autotools-dev,
autoconf-archive,
libreadline-dev,
libconfig-dev,
libssl-dev,
lua5.2,
liblua5.2-dev
Standards-Version: 3.9.4
Homepage: https://github.com/vysheng/tg
Vcs-Git: git://github.com/vysheng/tg.git
Vcs-Browser: https://github.com/vysheng/tg
Package: telegram-cli
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Command-line interface for Telegram messenger
Telegram messenger is a cloud-based instant messaging designed for
smart phones and similar to Whatsapp but more flexible, and
powerful. You can send messages, photos, videos and documents to
people who are in your phone contacts (and have Telegram). Telegram
also supports secret chats whose provide a private (encrypted) way of
communication.
.
This package contains a command-line based client for Telegram with
the following features:
* Colored terminal messages.
* Message management: history, stats, etc.
* Group chat: create and manage groups.
* Secret chat: secured and encrypted conversations.
* Contact management: add/edit/remove contacts.
* Multimedia support: send/load photos and videos.

28
debian/copyright vendored
View file

@ -1,28 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: telegram-cli
Source: https://github.com/vysheng/tg
Files: *
Copyright: 2013 Vitaly Valtman
License: GPL-2.0+
Files: debian/*
Copyright: 2014 Cleto Martín <cleto@debian.org>
License: GPL-2.0+
License: GPL-2.0+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

1
debian/docs vendored
View file

@ -1 +0,0 @@
README.md

1
debian/install vendored
View file

@ -1 +0,0 @@
telegram usr/bin

17
debian/rules vendored
View file

@ -1,17 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d'-')
PACKAGE_NAME=$(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
%:
dh $@ --with autotools-dev
build-orig:
mkdir -p $(PACKAGE_NAME)-$(VERSION)
tar --exclude=ax_lua.m4 --exclude=debian --exclude=\.pc \
--exclude=$(PACKAGE_NAME)-$(VERSION) -cf - . \
| ( cd $(PACKAGE_NAME)-$(VERSION) && tar xf - )
tar -cf ../$(PACKAGE_NAME)_$(VERSION).orig.tar $(PACKAGE_NAME)-$(VERSION)
$(RM) -r $(PACKAGE_NAME)-$(VERSION)
xz ../$(PACKAGE_NAME)_$(VERSION).orig.tar

View file

@ -1 +0,0 @@
3.0 (quilt)

4
debian/watch vendored
View file

@ -1,4 +0,0 @@
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/tg-$1\.tar\.gz/ \
https://github.com/vysheng/tg/tags .*/v?(\d\S*)\.tar\.gz

53
gen-origtar Executable file
View file

@ -0,0 +1,53 @@
#!/bin/sh
# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Matthias Jentsch, Ben Wiederhake 2016
set -e
# -- Cleanup possibly left-over artifacts
rm -f bin/tgl_tl-parser.tar bin/tgl.tar bin/commit.h.tar bin/result.tar bin/result.tar.gz
# -- Create parts
# Abuse the "bin" dir for temporary files.
( cd tgl/tl-parser && git archive --prefix=telegram-purple/tgl/tl-parser/ --output=../../bin/tgl_tl-parser.tar HEAD )
( cd tgl && git archive --prefix=telegram-purple/tgl/ --output=../bin/tgl.tar HEAD )
git archive --prefix=telegram-purple/ --output=bin/result.tar HEAD
# This is a lot of options. Here's why.
# --sort --mtime --owner --group => be reproducible (same commit produces binarily identical files)
# --transform => be in the same "tar-folder" as the rest
# (absence of --numeric-ids) => have identical behavior as git-archive
# --mode=664 => have identical behavior as git-archive
# http://www.gelato.unsw.edu.au/archives/git/0701/36326.html
# This is hacky. TODO: Find a better way to unify permissions.
tar --sort=name --mtime="1970-01-01 00:00Z" --owner=root --group=root --transform s%^%telegram-purple/% --mode=664 -cf bin/commit.h.tar commit.h
# -- Concatenate it all
tar --concatenate -f bin/result.tar bin/tgl.tar
tar --concatenate -f bin/result.tar bin/tgl_tl-parser.tar
tar --concatenate -f bin/result.tar bin/commit.h.tar
gzip -n bin/result.tar
# -- Determine name and move
TARNAME="telegram-purple_`git describe --tags | sed s/^v// `.orig.tar.gz"
# "mv -f" means "overwrite, if necessary"
echo mv -f bin/result.tar.gz $TARNAME
mv -f bin/result.tar.gz $TARNAME
# -- Cleanup (never fail)
rm -f bin/tgl_tl-parser.tar bin/tgl.tar bin/commit.h.tar bin/result.tar bin/result.tar.gz || true

View file

@ -1,37 +0,0 @@
BEGIN {
print "/*";
print " This file is part of telegram-client.";
print "";
print " Telegram-client is free software: you can redistribute it and/or modify";
print " it under the terms of the GNU General Public License as published by";
print " the Free Software Foundation, either version 2 of the License, or";
print " (at your option) any later version.";
print "";
print " Telegram-client is distributed in the hope that it will be useful,";
print " but WITHOUT ANY WARRANTY; without even the implied warranty of";
print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the";
print " GNU General Public License for more details.";
print "";
print " You should have received a copy of the GNU General Public License";
print " along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.";
print "";
print " Copyright Vitaly Valtman 2013";
print "*/";
print "#ifndef CONSTANTS_H";
print "#define CONSTANTS_H";
}
// {
if (split ($1, a, "#") == 2) {
gsub (/[A-Z]/, "_&", a[1]);
gsub (/[.]/, "_", a[1]);
if (a[2] in h) {
print "ERROR: Duplicate magic " a[2] " for define " a[1] " and " h[a[2]] >"/dev/stderr/"
exit 1;
}
h[a[2]] = a[1];
print "#define", "CODE_" tolower(a[1]), "0x" a[2];
}
}
END {
print "#endif";
}

View file

@ -1 +0,0 @@
EBUILD telegram-cli-9999.ebuild 641 SHA256 4597e2f84c36b1ee02ecc415c399408bb8536b456e94370e996d57477db621be SHA512 287da263c9a4ba2058bf2f5844599432619053abc9249fd5725ed7b5e920c5c02e2493ad7b07f89177933b2c15394d939e7dc7dbf05d5873c32e55c9ec614d4c WHIRLPOOL 73dee37f91f1d4b747afc35c0a0cb2efb141d37702c71a7a9d188d2e1d727375c0ee3e7a1192e6c4c34f17ba1303f3a0be47b24272b5378ff255bce1a4a281be

View file

@ -1,31 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
EGIT_REPO_URI="https://github.com/vysheng/tg.git"
inherit git-2
IUSE="lua"
DESCRIPTION="Command line interface client for Telegram"
HOMEPAGE="https://github.com/vysheng/tg"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="sys-libs/zlib
sys-libs/readline
dev-libs/libconfig
dev-libs/openssl
lua? ( dev-lang/lua )"
src_configure() {
econf $(use_enable lua liblua ) --with-progname=telegram-cli
}
src_install() {
newbin telegram telegram-cli
insinto /etc/telegram-cli/
newins tg-server.pub server.pub
}

BIN
imgs/telegram.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
imgs/telegram16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
imgs/telegram22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

BIN
imgs/telegram48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,24 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __INCLUDE_H__
#define __INCLUDE_H__
#define UU __attribute__ ((unused))
#endif

527
install-sh Executable file
View file

@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

File diff suppressed because it is too large Load diff

View file

@ -1,63 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __INTERFACE_H__
#define __INTERFACE_H__
#include "structures.h"
#define COLOR_RED "\033[0;31m"
#define COLOR_REDB "\033[1;31m"
#define COLOR_NORMAL "\033[0m"
#define COLOR_GREEN "\033[32;1m"
#define COLOR_GREY "\033[37;1m"
#define COLOR_YELLOW "\033[33;1m"
#define COLOR_BLUE "\033[34;1m"
#define COLOR_MAGENTA "\033[35;1m"
#define COLOR_CYAN "\033[36;1m"
#define COLOR_LCYAN "\033[0;36m"
#define COLOR_INVERSE "\033[7m"
char *get_default_prompt (void);
char *complete_none (const char *text, int state);
char **complete_text (char *text, int start, int end);
void interpreter (char *line);
void rprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
void logprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
void hexdump (int *in_ptr, int *in_end);
struct message;
union peer;
void print_message (struct message *M);
void print_chat_name (peer_id_t id, union peer *C);
void print_user_name (peer_id_t id, union peer *U);
void print_encr_chat_name_full (peer_id_t id, peer_t *C);
void print_encr_chat_name (peer_id_t id, peer_t *C);
//void print_media (struct message_media *M);
void pop_color (void);
void push_color (const char *color);
void print_start (void);
void print_end (void);
void print_date_full (long t);
void print_date (long t);
void play_sound (void);
void update_prompt (void);
void set_interface_callbacks (void);
#endif

626
loop.c
View file

@ -1,626 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _GNU_SOURCE
#define READLINE_CALLBACKS
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef READLINE_GNU
#include <readline/readline.h>
#include <readline/history.h>
#else
#include <readline/readline.h>
#include <readline/history.h>
#endif
#include <errno.h>
#include <poll.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "interface.h"
#include "net.h"
#include "mtproto-client.h"
#include "mtproto-common.h"
#include "queries.h"
#include "telegram.h"
#include "loop.h"
#include "binlog.h"
#include "lua-tg.h"
extern char *default_username;
extern char *auth_token;
extern int test_dc;
void set_default_username (const char *s);
int default_dc_num;
extern int binlog_enabled;
extern int unknown_user_list_pos;
extern int unknown_user_list[];
int register_mode;
extern int safe_quit;
extern int queries_num;
int unread_messages;
void got_it (char *line, int len);
void net_loop (int flags, int (*is_end)(void)) {
while (!is_end ()) {
struct pollfd fds[101];
int cc = 0;
if (flags & 3) {
fds[0].fd = 0;
fds[0].events = POLLIN;
cc ++;
}
write_state_file ();
int x = connections_make_poll_array (fds + cc, 101 - cc) + cc;
double timer = next_timer_in ();
if (timer > 1000) { timer = 1000; }
if (poll (fds, x, timer) < 0) {
work_timers ();
continue;
}
work_timers ();
if ((flags & 3) && (fds[0].revents & POLLIN)) {
unread_messages = 0;
if (flags & 1) {
rl_callback_read_char ();
} else {
char *line = 0;
size_t len = 0;
assert (getline (&line, &len, stdin) >= 0);
got_it (line, strlen (line));
}
}
connections_poll_result (fds + cc, x - cc);
#ifdef USE_LUA
lua_do_all ();
#endif
if (safe_quit && !queries_num) {
printf ("All done. Exit\n");
rl_callback_handler_remove ();
exit (0);
}
if (unknown_user_list_pos) {
do_get_user_list_info_silent (unknown_user_list_pos, unknown_user_list);
unknown_user_list_pos = 0;
}
}
}
char **_s;
size_t *_l;
int got_it_ok;
void got_it (char *line, int len) {
assert (len > 0);
line[-- len] = 0; // delete end of line
*_s = line;
*_l = len;
got_it_ok = 1;
}
int is_got_it (void) {
return got_it_ok;
}
int net_getline (char **s, size_t *l) {
fflush (stdout);
// rl_already_prompted = 1;
got_it_ok = 0;
_s = s;
_l = l;
// rl_callback_handler_install (0, got_it);
net_loop (2, is_got_it);
return 0;
}
int ret1 (void) { return 0; }
int main_loop (void) {
net_loop (1, ret1);
return 0;
}
struct dc *DC_list[MAX_DC_ID + 1];
struct dc *DC_working;
int dc_working_num;
int auth_state;
char *get_auth_key_filename (void);
char *get_state_filename (void);
char *get_secret_chat_filename (void);
int zero[512];
void write_dc (int auth_file_fd, struct dc *DC) {
assert (write (auth_file_fd, &DC->port, 4) == 4);
int l = strlen (DC->ip);
assert (write (auth_file_fd, &l, 4) == 4);
assert (write (auth_file_fd, DC->ip, l) == l);
if (DC->flags & 1) {
assert (write (auth_file_fd, &DC->auth_key_id, 8) == 8);
assert (write (auth_file_fd, DC->auth_key, 256) == 256);
} else {
assert (write (auth_file_fd, zero, 256 + 8) == 256 + 8);
}
assert (write (auth_file_fd, &DC->server_salt, 8) == 8);
assert (write (auth_file_fd, &DC->has_auth, 4) == 4);
}
int our_id;
void write_auth_file (void) {
if (binlog_enabled) { return; }
int auth_file_fd = open (get_auth_key_filename (), O_CREAT | O_RDWR, 0600);
assert (auth_file_fd >= 0);
int x = DC_SERIALIZED_MAGIC_V2;
assert (write (auth_file_fd, &x, 4) == 4);
x = MAX_DC_ID;
assert (write (auth_file_fd, &x, 4) == 4);
assert (write (auth_file_fd, &dc_working_num, 4) == 4);
assert (write (auth_file_fd, &auth_state, 4) == 4);
int i;
for (i = 0; i <= MAX_DC_ID; i++) {
if (DC_list[i]) {
x = 1;
assert (write (auth_file_fd, &x, 4) == 4);
write_dc (auth_file_fd, DC_list[i]);
} else {
x = 0;
assert (write (auth_file_fd, &x, 4) == 4);
}
}
assert (write (auth_file_fd, &our_id, 4) == 4);
close (auth_file_fd);
}
void read_dc (int auth_file_fd, int id, unsigned ver) {
int port = 0;
assert (read (auth_file_fd, &port, 4) == 4);
int l = 0;
assert (read (auth_file_fd, &l, 4) == 4);
assert (l >= 0);
char *ip = talloc (l + 1);
assert (read (auth_file_fd, ip, l) == l);
ip[l] = 0;
struct dc *DC = alloc_dc (id, ip, port);
assert (read (auth_file_fd, &DC->auth_key_id, 8) == 8);
assert (read (auth_file_fd, &DC->auth_key, 256) == 256);
assert (read (auth_file_fd, &DC->server_salt, 8) == 8);
if (DC->auth_key_id) {
DC->flags |= 1;
}
if (ver != DC_SERIALIZED_MAGIC) {
assert (read (auth_file_fd, &DC->has_auth, 4) == 4);
} else {
DC->has_auth = 0;
}
}
void empty_auth_file (void) {
alloc_dc (1, tstrdup (test_dc ? TG_SERVER_TEST : TG_SERVER), 443);
dc_working_num = 1;
auth_state = 0;
write_auth_file ();
}
int need_dc_list_update;
void read_auth_file (void) {
if (binlog_enabled) { return; }
int auth_file_fd = open (get_auth_key_filename (), O_CREAT | O_RDWR, 0600);
if (auth_file_fd < 0) {
empty_auth_file ();
}
assert (auth_file_fd >= 0);
unsigned x;
unsigned m;
if (read (auth_file_fd, &m, 4) < 4 || (m != DC_SERIALIZED_MAGIC && m != DC_SERIALIZED_MAGIC_V2)) {
close (auth_file_fd);
empty_auth_file ();
return;
}
assert (read (auth_file_fd, &x, 4) == 4);
assert (x <= MAX_DC_ID);
assert (read (auth_file_fd, &dc_working_num, 4) == 4);
assert (read (auth_file_fd, &auth_state, 4) == 4);
if (m == DC_SERIALIZED_MAGIC) {
auth_state = 700;
}
int i;
for (i = 0; i <= (int)x; i++) {
int y;
assert (read (auth_file_fd, &y, 4) == 4);
if (y) {
read_dc (auth_file_fd, i, m);
}
}
int l = read (auth_file_fd, &our_id, 4);
if (l < 4) {
assert (!l);
}
close (auth_file_fd);
DC_working = DC_list[dc_working_num];
if (m == DC_SERIALIZED_MAGIC) {
DC_working->has_auth = 1;
}
}
int pts, qts, seq, last_date;
void read_state_file (void) {
if (binlog_enabled) { return; }
int state_file_fd = open (get_state_filename (), O_CREAT | O_RDWR, 0600);
if (state_file_fd < 0) {
return;
}
int version, magic;
if (read (state_file_fd, &magic, 4) < 4) { close (state_file_fd); return; }
if (magic != (int)STATE_FILE_MAGIC) { close (state_file_fd); return; }
if (read (state_file_fd, &version, 4) < 4) { close (state_file_fd); return; }
assert (version >= 0);
int x[4];
if (read (state_file_fd, x, 16) < 16) {
close (state_file_fd);
return;
}
pts = x[0];
qts = x[1];
seq = x[2];
last_date = x[3];
close (state_file_fd);
}
void write_state_file (void) {
if (binlog_enabled) { return; }
static int wseq;
static int wpts;
static int wqts;
static int wdate;
if (wseq >= seq && wpts >= pts && wqts >= qts && wdate >= last_date) { return; }
int state_file_fd = open (get_state_filename (), O_CREAT | O_RDWR, 0600);
if (state_file_fd < 0) {
return;
}
int x[6];
x[0] = STATE_FILE_MAGIC;
x[1] = 0;
x[2] = pts;
x[3] = qts;
x[4] = seq;
x[5] = last_date;
assert (write (state_file_fd, x, 24) == 24);
close (state_file_fd);
wseq = seq; wpts = pts; wqts = qts; wdate = last_date;
}
extern peer_t *Peers[];
extern int peer_num;
extern int encr_root;
extern unsigned char *encr_prime;
extern int encr_param_version;
extern int dialog_list_got;
void read_secret_chat_file (void) {
if (binlog_enabled) { return; }
int fd = open (get_secret_chat_filename (), O_CREAT | O_RDWR, 0600);
if (fd < 0) {
return;
}
int x[2];
if (read (fd, x, 8) < 8) {
close (fd); return;
}
if (x[0] != (int)SECRET_CHAT_FILE_MAGIC) { close (fd); return; }
int version = x[1];
assert (version >= 0);
int cc;
assert (read (fd, &cc, 4) == 4);
int i;
for (i = 0; i < cc; i++) {
peer_t *P = talloc0 (sizeof (*P));
struct secret_chat *E = &P->encr_chat;
int t;
assert (read (fd, &t, 4) == 4);
P->id = MK_ENCR_CHAT (t);
assert (read (fd, &P->flags, 4) == 4);
assert (read (fd, &t, 4) == 4);
assert (t > 0);
P->print_name = talloc (t + 1);
assert (read (fd, P->print_name, t) == t);
P->print_name[t] = 0;
peer_insert_name (P);
assert (read (fd, &E->state, 4) == 4);
assert (read (fd, &E->user_id, 4) == 4);
assert (read (fd, &E->admin_id, 4) == 4);
assert (read (fd, &E->ttl, 4) == 4);
assert (read (fd, &E->access_hash, 8) == 8);
if (E->state != sc_waiting) {
E->g_key = talloc (256);
assert (read (fd, E->g_key, 256) == 256);
E->nonce = talloc (256);
assert (read (fd, E->nonce, 256) == 256);
}
assert (read (fd, E->key, 256) == 256);
assert (read (fd, &E->key_fingerprint, 8) == 8);
insert_encrypted_chat (P);
}
if (version >= 1) {
assert (read (fd, &encr_root, 4) == 4);
if (encr_root) {
assert (read (fd, &encr_param_version, 4) == 4);
encr_prime = talloc (256);
assert (read (fd, encr_prime, 256) == 256);
}
}
close (fd);
}
void write_secret_chat_file (void) {
if (binlog_enabled) { return; }
int fd = open (get_secret_chat_filename (), O_CREAT | O_RDWR, 0600);
if (fd < 0) {
return;
}
int x[2];
x[0] = SECRET_CHAT_FILE_MAGIC;
x[1] = 1;
assert (write (fd, x, 8) == 8);
int i;
int cc = 0;
for (i = 0; i < peer_num; i++) if (get_peer_type (Peers[i]->id) == PEER_ENCR_CHAT) {
if (Peers[i]->encr_chat.state != sc_none && Peers[i]->encr_chat.state != sc_deleted) {
cc ++;
}
}
assert (write (fd, &cc, 4) == 4);
for (i = 0; i < peer_num; i++) if (get_peer_type (Peers[i]->id) == PEER_ENCR_CHAT) {
if (Peers[i]->encr_chat.state != sc_none && Peers[i]->encr_chat.state != sc_deleted) {
int t = get_peer_id (Peers[i]->id);
assert (write (fd, &t, 4) == 4);
t = Peers[i]->flags;
assert (write (fd, &t, 4) == 4);
t = strlen (Peers[i]->print_name);
assert (write (fd, &t, 4) == 4);
assert (write (fd, Peers[i]->print_name, t) == t);
assert (write (fd, &Peers[i]->encr_chat.state, 4) == 4);
assert (write (fd, &Peers[i]->encr_chat.user_id, 4) == 4);
assert (write (fd, &Peers[i]->encr_chat.admin_id, 4) == 4);
assert (write (fd, &Peers[i]->encr_chat.ttl, 4) == 4);
assert (write (fd, &Peers[i]->encr_chat.access_hash, 8) == 8);
if (Peers[i]->encr_chat.state != sc_waiting) {
assert (write (fd, Peers[i]->encr_chat.g_key, 256) == 256);
}
if (Peers[i]->encr_chat.state != sc_waiting) {
assert (write (fd, Peers[i]->encr_chat.nonce, 256) == 256);
}
assert (write (fd, Peers[i]->encr_chat.key, 256) == 256);
assert (write (fd, &Peers[i]->encr_chat.key_fingerprint, 8) == 8);
}
}
assert (write (fd, &encr_root, 4) == 4);
if (encr_root) {
assert (write (fd, &encr_param_version, 4) == 4);
assert (write (fd, encr_prime, 256) == 256);
}
close (fd);
}
extern int max_chat_size;
int mcs (void) {
return max_chat_size;
}
extern int difference_got;
int dgot (void) {
return difference_got;
}
int dlgot (void) {
return dialog_list_got;
}
int readline_active;
int new_dc_num;
int wait_dialog_list;
int loop (void) {
on_start ();
if (binlog_enabled) {
double t = get_double_time ();
logprintf ("replay log start\n");
replay_log ();
logprintf ("replay log end in %lf seconds\n", get_double_time () - t);
write_binlog ();
#ifdef USE_LUA
lua_binlog_end ();
#endif
} else {
read_auth_file ();
}
update_prompt ();
assert (DC_list[dc_working_num]);
if (!DC_working || !DC_working->auth_key_id) {
// if (auth_state == 0) {
DC_working = DC_list[dc_working_num];
assert (!DC_working->auth_key_id);
dc_authorize (DC_working);
assert (DC_working->auth_key_id);
auth_state = 100;
write_auth_file ();
}
if (verbosity) {
logprintf ("Requesting info about DC...\n");
}
do_help_get_config ();
net_loop (0, mcs);
if (verbosity) {
logprintf ("DC_info: %d new DC got\n", new_dc_num);
}
int i;
for (i = 0; i <= MAX_DC_NUM; i++) if (DC_list[i] && !DC_list[i]->auth_key_id) {
dc_authorize (DC_list[i]);
assert (DC_list[i]->auth_key_id);
write_auth_file ();
}
if (auth_state == 100 || !(DC_working->has_auth)) {
if (!default_username) {
size_t size = 0;
char *user = 0;
if (!user) {
printf ("Telephone number (with '+' sign): ");
if (net_getline (&user, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
set_default_username (user);
}
}
int res = do_auth_check_phone (default_username);
assert (res >= 0);
logprintf ("%s\n", res > 0 ? "phone registered" : "phone not registered");
if (res > 0 && !register_mode) {
do_send_code (default_username);
char *code = 0;
size_t size = 0;
printf ("Code from sms (if you did not receive an SMS and want to be called, type \"call\"): ");
while (1) {
if (net_getline (&code, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
if (!strcmp (code, "call")) {
printf ("You typed \"call\", switching to phone system.\n");
do_phone_call (default_username);
printf ("Calling you! Code: ");
continue;
}
if (do_send_code_result (code) >= 0) {
break;
}
printf ("Invalid code. Try again: ");
tfree_str (code);
}
auth_state = 300;
} else {
printf ("User is not registered. Do you want to register? [Y/n] ");
char *code;
size_t size;
if (net_getline (&code, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
if (!*code || *code == 'y' || *code == 'Y') {
printf ("Ok, starting registartion.\n");
} else {
printf ("Then try again\n");
exit (EXIT_SUCCESS);
}
char *first_name;
printf ("First name: ");
if (net_getline (&first_name, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
char *last_name;
printf ("Last name: ");
if (net_getline (&last_name, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
int dc_num = do_get_nearest_dc ();
assert (dc_num >= 0 && dc_num <= MAX_DC_NUM && DC_list[dc_num]);
dc_working_num = dc_num;
DC_working = DC_list[dc_working_num];
do_send_code (default_username);
printf ("Code from sms (if you did not receive an SMS and want to be called, type \"call\"): ");
while (1) {
if (net_getline (&code, &size) == -1) {
perror ("getline()");
exit (EXIT_FAILURE);
}
if (!strcmp (code, "call")) {
printf ("You typed \"call\", switching to phone system.\n");
do_phone_call (default_username);
printf ("Calling you! Code: ");
continue;
}
if (do_send_code_result_auth (code, first_name, last_name) >= 0) {
break;
}
printf ("Invalid code. Try again: ");
tfree_str (code);
}
auth_state = 300;
}
}
for (i = 0; i <= MAX_DC_NUM; i++) if (DC_list[i] && !DC_list[i]->has_auth) {
do_export_auth (i);
do_import_auth (i);
bl_do_dc_signed (i);
write_auth_file ();
}
write_auth_file ();
fflush (stdout);
fflush (stderr);
read_state_file ();
read_secret_chat_file ();
set_interface_callbacks ();
do_get_difference ();
net_loop (0, dgot);
#ifdef USE_LUA
lua_diff_end ();
#endif
send_all_unsent ();
do_get_dialog_list ();
if (wait_dialog_list) {
dialog_list_got = 0;
net_loop (0, dlgot);
}
return main_loop ();
}

26
loop.h
View file

@ -1,26 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __LOOP_H__
#define __LOOP_H__
int loop (void);
void net_loop (int flags, int (*end)(void));
void write_auth_file (void);
void write_state_file (void);
void write_secret_chat_file (void);
#endif

549
lua-tg.c
View file

@ -1,549 +0,0 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef USE_LUA
#include "lua-tg.h"
#include "include.h"
#include <string.h>
#include <stdlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
lua_State *luaState;
#include "structures.h"
#include "interface.h"
#include "constants.h"
#include "tools.h"
#include "queries.h"
#include "net.h"
extern int verbosity;
static int have_file;
#define my_lua_checkstack(L,x) assert (lua_checkstack (L, x))
void push_user (peer_t *P UU);
void push_peer (peer_id_t id, peer_t *P);
void lua_add_string_field (const char *name, const char *value) {
assert (name && strlen (name));
if (!value || !strlen (value)) { return; }
my_lua_checkstack (luaState, 3);
lua_pushstring (luaState, name);
lua_pushstring (luaState, value);
lua_settable (luaState, -3);
}
void lua_add_num_field (const char *name, double value) {
assert (name && strlen (name));
my_lua_checkstack (luaState, 3);
lua_pushstring (luaState, name);
lua_pushnumber (luaState, value);
lua_settable (luaState, -3);
}
void push_peer_type (int x) {
switch (x) {
case PEER_USER:
lua_pushstring (luaState, "user");
break;
case PEER_CHAT:
lua_pushstring (luaState, "chat");
break;
case PEER_ENCR_CHAT:
lua_pushstring (luaState, "encr_chat");
break;
default:
assert (0);
}
}
void push_user (peer_t *P UU) {
my_lua_checkstack (luaState, 4);
lua_add_string_field ("first_name", P->user.first_name);
lua_add_string_field ("last_name", P->user.last_name);
lua_add_string_field ("real_first_name", P->user.real_first_name);
lua_add_string_field ("real_last_name", P->user.real_last_name);
lua_add_string_field ("phone", P->user.phone);
}
void push_chat (peer_t *P) {
my_lua_checkstack (luaState, 4);
assert (P->chat.title);
lua_add_string_field ("title", P->chat.title);
lua_add_num_field ("members_num", P->chat.users_num);
}
void push_encr_chat (peer_t *P) {
my_lua_checkstack (luaState, 4);
lua_pushstring (luaState, "user");
push_peer (MK_USER (P->encr_chat.user_id), user_chat_get (MK_USER (P->encr_chat.user_id)));
lua_settable (luaState, -3);
}
void push_peer (peer_id_t id, peer_t *P) {
lua_newtable (luaState);
lua_add_num_field ("id", get_peer_id (id));
lua_pushstring (luaState, "type");
push_peer_type (get_peer_type (id));
lua_settable (luaState, -3);
if (!P || !(P->flags & FLAG_CREATED)) {
lua_pushstring (luaState, "print_name");
static char s[100];
switch (get_peer_type (id)) {
case PEER_USER:
sprintf (s, "user#%d", get_peer_id (id));
break;
case PEER_CHAT:
sprintf (s, "chat#%d", get_peer_id (id));
break;
case PEER_ENCR_CHAT:
sprintf (s, "encr_chat#%d", get_peer_id (id));
break;
default:
assert (0);
}
lua_pushstring (luaState, s);
lua_settable (luaState, -3); // flags
return;
}
lua_add_string_field ("print_name", P->print_name);
lua_add_num_field ("flags", P->flags);
switch (get_peer_type (id)) {
case PEER_USER:
push_user (P);
break;
case PEER_CHAT:
push_chat (P);
break;
case PEER_ENCR_CHAT:
push_encr_chat (P);
break;
default:
assert (0);
}
}
void push_media (struct message_media *M) {
my_lua_checkstack (luaState, 4);
switch (M->type) {
case CODE_message_media_photo:
case CODE_decrypted_message_media_photo:
lua_pushstring (luaState, "photo");
break;
case CODE_message_media_video:
case CODE_decrypted_message_media_video:
lua_pushstring (luaState, "video");
break;
case CODE_message_media_audio:
case CODE_decrypted_message_media_audio:
lua_pushstring (luaState, "audio");
break;
case CODE_message_media_document:
case CODE_decrypted_message_media_document:
lua_pushstring (luaState, "document");
break;
case CODE_message_media_unsupported:
lua_pushstring (luaState, "unsupported");
break;
case CODE_message_media_geo:
lua_newtable (luaState);
lua_add_num_field ("longitude", M->geo.longitude);
lua_add_num_field ("latitude", M->geo.latitude);
break;
case CODE_message_media_contact:
case CODE_decrypted_message_media_contact:
lua_newtable (luaState);
lua_add_string_field ("phone", M->phone);
lua_add_string_field ("first_name", M->first_name);
lua_add_string_field ("last_name", M->last_name);
lua_add_num_field ("user_id", M->user_id);
break;
default:
lua_pushstring (luaState, "???");
}
}
void push_message (struct message *M) {
assert (M);
my_lua_checkstack (luaState, 10);
lua_newtable (luaState);
static char s[30];
tsnprintf (s, 30, "%lld", M->id);
lua_add_string_field ("id", s);
lua_add_num_field ("flags", M->flags);
if (get_peer_type (M->fwd_from_id)) {
lua_pushstring (luaState, "fwd_from");
push_peer (M->fwd_from_id, user_chat_get (M->fwd_from_id));
lua_settable (luaState, -3); // fwd_from
lua_add_num_field ("fwd_date", M->fwd_date);
}
lua_pushstring (luaState, "from");
push_peer (M->from_id, user_chat_get (M->from_id));
lua_settable (luaState, -3);
lua_pushstring (luaState, "to");
push_peer (M->to_id, user_chat_get (M->to_id));
lua_settable (luaState, -3);
lua_pushstring (luaState, "out");
lua_pushboolean (luaState, M->out);
lua_settable (luaState, -3);
lua_pushstring (luaState, "unread");
lua_pushboolean (luaState, M->unread);
lua_settable (luaState, -3);
lua_pushstring (luaState, "date");
lua_pushnumber (luaState, M->date);
lua_settable (luaState, -3);
lua_pushstring (luaState, "service");
lua_pushboolean (luaState, M->service);
lua_settable (luaState, -3);
if (!M->service) {
if (M->message_len && M->message) {
lua_pushstring (luaState, "text");
lua_pushlstring (luaState, M->message, M->message_len);
lua_settable (luaState, -3);
}
if (M->media.type && M->media.type != CODE_message_media_empty && M->media.type != CODE_decrypted_message_media_empty) {
lua_pushstring (luaState, "media");
push_media (&M->media);
lua_settable (luaState, -3);
}
}
}
void lua_binlog_end (void) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_binlog_replay_end");
assert (lua_gettop (luaState) == 1);
int r = lua_pcall (luaState, 0, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_diff_end (void) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_get_difference_end");
assert (lua_gettop (luaState) == 1);
int r = lua_pcall (luaState, 0, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_our_id (int id) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_our_id");
lua_pushnumber (luaState, id);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_new_msg (struct message *M UU) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_msg_receive");
push_message (M);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_secret_chat_created (struct secret_chat *C) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_secret_chat_created");
push_peer (C->id, (void *)C);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_user_update (struct user *U) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_user_update");
push_peer (U->id, (void *)U);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
void lua_chat_update (struct chat *C) {
if (!have_file) { return; }
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_getglobal (luaState, "on_chat_update");
push_peer (C->id, (void *)C);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
}
extern peer_t *Peers[];
extern int peer_num;
#define MAX_LUA_COMMANDS 1000
void *lua_ptr[MAX_LUA_COMMANDS];
static int pos;
static peer_t *get_peer (const char *s) {
int index = 0;
while (index < peer_num && (!Peers[index]->print_name || strcmp (Peers[index]->print_name, s))) {
index ++;
}
return index == peer_num ? 0 : Peers[index];
}
void lua_do_all (void) {
int p = 0;
while (p < pos) {
int l = (long)lua_ptr[p ++];
assert (p + l + 1 <= pos);
int f = (long)lua_ptr[p ++];
switch (f) {
case 0:
do_send_message (((peer_t *)lua_ptr[p])->id, lua_ptr[p + 1], strlen (lua_ptr[p + 1]));
tfree_str (lua_ptr[p + 1]);
p += 2;
break;
case 1:
do_forward_message (((peer_t *)lua_ptr[p])->id, (long)lua_ptr[p + 1]);
p += 2;
break;
case 2:
#ifdef DEBUG
texists (lua_ptr[p], sizeof (peer_t));
#endif
do_mark_read (((peer_t *)lua_ptr[p])->id);
p += 1;
break;
default:
assert (0);
}
}
pos = 0;
}
static int send_msg_from_lua (lua_State *L) {
if (MAX_LUA_COMMANDS - pos < 4) {
lua_pushboolean (L, 0);
return 1;
}
int n = lua_gettop (L);
if (n != 2) {
lua_pushboolean (L, 0);
return 1;
}
const char *s = lua_tostring (L, -2);
if (!s) {
lua_pushboolean (L, 0);
return 1;
}
const char *msg = lua_tostring (L, -1);
peer_t *P = get_peer (s);
if (!P) {
lua_pushboolean (L, 0);
return 1;
}
lua_ptr[pos ++] = (void *)2l;
lua_ptr[pos ++] = (void *)0l;
lua_ptr[pos ++] = P;
lua_ptr[pos ++] = tstrdup (msg);
logprintf ("msg = %s\n", msg);
lua_pushboolean (L, 1);
return 1;
}
static int fwd_msg_from_lua (lua_State *L) {
if (MAX_LUA_COMMANDS - pos < 4) {
lua_pushboolean (L, 0);
return 1;
}
int n = lua_gettop (L);
if (n != 2) {
lua_pushboolean (L, 0);
return 1;
}
const char *s = lua_tostring (L, -2);
long long num = atoll (lua_tostring (L, -1));
if (!s) {
lua_pushboolean (L, 0);
return 1;
}
peer_t *P = get_peer (s);
if (!P) {
lua_pushboolean (L, 0);
return 1;
}
lua_ptr[pos ++] = (void *)2l;
lua_ptr[pos ++] = (void *)1l;
lua_ptr[pos ++] = P;
lua_ptr[pos ++] = (void *)(long)num;
lua_pushboolean (L, 1);
return 1;
}
static int mark_read_from_lua (lua_State *L) {
if (MAX_LUA_COMMANDS - pos < 4) {
lua_pushboolean (L, 0);
return 1;
}
int n = lua_gettop (L);
if (n != 1) {
lua_pushboolean (L, 0);
return 1;
}
const char *s = lua_tostring (L, -1);
if (!s) {
lua_pushboolean (L, 0);
return 1;
}
peer_t *P = get_peer (s);
if (!P) {
lua_pushboolean (L, 0);
return 1;
}
lua_ptr[pos ++] = (void *)1l;
lua_ptr[pos ++] = (void *)2l;
lua_ptr[pos ++] = P;
lua_pushboolean (L, 1);
return 1;
}
int lua_postpone_alarm (void *self) {
int *t = self;
lua_settop (luaState, 0);
//lua_checkstack (luaState, 20);
my_lua_checkstack (luaState, 20);
lua_rawgeti (luaState, LUA_REGISTRYINDEX, t[1]);
lua_rawgeti (luaState, LUA_REGISTRYINDEX, t[0]);
assert (lua_gettop (luaState) == 2);
int r = lua_pcall (luaState, 1, 0, 0);
luaL_unref (luaState, LUA_REGISTRYINDEX, t[0]);
luaL_unref (luaState, LUA_REGISTRYINDEX, t[1]);
if (r) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
}
tfree (*(void **)(t + 2), sizeof (struct event_timer));
tfree (t, 16);
return 0;
}
static int postpone_from_lua (lua_State *L) {
int n = lua_gettop (L);
if (n != 3) {
lua_pushboolean (L, 0);
return 1;
}
double timeout = lua_tonumber (L, -1);
if (timeout < 0) {
lua_pushboolean (L, 0);
return 1;
}
lua_pop (L, 1);
int a1 = luaL_ref (L, LUA_REGISTRYINDEX);
int a2 = luaL_ref (L, LUA_REGISTRYINDEX);
struct event_timer *ev = talloc (sizeof (*ev));
int *t = talloc (16);
t[0] = a1;
t[1] = a2;
*(void **)(t + 2) = ev;
ev->timeout = get_double_time () + timeout;
ev->alarm = (void *)lua_postpone_alarm;
ev->self = t;
insert_event_timer (ev);
lua_pushboolean (L, 1);
return 1;
}
void lua_init (const char *file) {
if (!file) { return; }
have_file = 1;
luaState = luaL_newstate ();
luaL_openlibs (luaState);
lua_register (luaState, "send_msg", send_msg_from_lua);
lua_register (luaState, "fwd_msg", fwd_msg_from_lua);
lua_register (luaState, "mark_read", mark_read_from_lua);
lua_register (luaState, "postpone", postpone_from_lua);
int ret = luaL_dofile (luaState, file);
if (ret) {
logprintf ("lua: %s\n", lua_tostring (luaState, -1));
exit (1);
}
}
#endif

View file

@ -1,16 +0,0 @@
#ifndef __LUA_TG_H__
#define __LUA_TG_H__
#include <string.h>
#include "structures.h"
void lua_init (const char *file);
void lua_new_msg (struct message *M);
void lua_our_id (int id);
void lua_secret_chat_created (struct secret_chat *U);
void lua_user_update (struct user *U);
void lua_chat_update (struct chat *C);
void lua_binlog_end (void);
void lua_diff_end (void);
void lua_do_all (void);
#endif

124
m4_ax_check_openssl.m4 Normal file
View file

@ -0,0 +1,124 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
#
# DESCRIPTION
#
# Look for OpenSSL in a number of default spots, or in a user-selected
# spot (via --with-openssl). Sets
#
# OPENSSL_INCLUDES to the include directives required
# OPENSSL_LIBS to the -l directives required
# OPENSSL_LDFLAGS to the -L or -R flags required
#
# and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
#
# This macro sets OPENSSL_INCLUDES such that source files should use the
# openssl/ directory in include directives:
#
# #include <openssl/hmac.h>
#
# LICENSE
#
# Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
# Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
AC_DEFUN([AX_CHECK_OPENSSL], [
found=false
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl=DIR],
[root of the OpenSSL directory])],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([Invalid --with-openssl value])
;;
*) ssldirs="$withval"
;;
esac
], [
# if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
if test x"$PKG_CONFIG" != x""; then
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
if test $? = 0; then
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
found=true
fi
fi
# no such luck; use some default ssldirs
if ! $found; then
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
fi
]
)
# note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
# an 'openssl' subdirectory
if ! $found; then
OPENSSL_INCLUDES=
for ssldir in $ssldirs; do
AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L$ssldir/lib"
OPENSSL_LIBS="-lssl -lcrypto"
found=true
AC_MSG_RESULT([yes])
break
else
AC_MSG_RESULT([no])
fi
done
# if the file wasn't found, well, go ahead and try the link anyway -- maybe
# it will just work!
fi
# try the preprocessor and linker with our new flags,
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
save_CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
LIBS="$OPENSSL_LIBS $LIBS"
CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
[
AC_MSG_RESULT([yes])
$1
], [
AC_MSG_RESULT([no])
$2
])
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
AC_SUBST([OPENSSL_INCLUDES])
AC_SUBST([OPENSSL_LIBS])
AC_SUBST([OPENSSL_LDFLAGS])
])

142
m4_ax_check_zlib.m4 Normal file
View file

@ -0,0 +1,142 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_ZLIB([action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
# This macro searches for an installed zlib library. If nothing was
# specified when calling configure, it searches first in /usr/local and
# then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,
# it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
# --without-zlib is specified, the library is not searched at all.
#
# If either the header file (zlib.h) or the library (libz) is not found,
# shell commands 'action-if-not-found' is run. If 'action-if-not-found' is
# not specified, the configuration exits on error, asking for a valid zlib
# installation directory or --without-zlib.
#
# If both header file and library are found, shell commands
# 'action-if-found' is run. If 'action-if-found' is not specified, the
# default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
# for this symbol in a config.h file. Sample usage in a C/C++ source is as
# follows:
#
# #ifdef HAVE_LIBZ
# #include <zlib.h>
# #endif /* HAVE_LIBZ */
#
# LICENSE
#
# Copyright (c) 2008 Loic Dachary <loic@senga.org>
# Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 14
AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])
AC_DEFUN([AX_CHECK_ZLIB],
#
# Handle user hints
#
[AC_MSG_CHECKING(if zlib is wanted)
zlib_places="/usr/local /usr /opt/local /sw"
AC_ARG_WITH([zlib],
[ --with-zlib=DIR root directory path of zlib installation @<:@defaults to
/usr/local or /usr if not found in /usr/local@:>@
--without-zlib to disable zlib usage completely],
[if test "$withval" != no ; then
AC_MSG_RESULT(yes)
if test -d "$withval"
then
zlib_places="$withval $zlib_places"
else
AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
fi
else
zlib_places=
AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(yes)])
#
# Locate zlib, if wanted
#
if test -n "${zlib_places}"
then
# check the user supplied or any other more or less 'standard' place:
# Most UNIX systems : /usr/local and /usr
# MacPorts / Fink on OSX : /opt/local respectively /sw
for ZLIB_HOME in ${zlib_places} ; do
if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi
ZLIB_HOME=""
done
ZLIB_OLD_LDFLAGS=$LDFLAGS
ZLIB_OLD_CPPFLAGS=$CPPFLAGS
if test -n "${ZLIB_HOME}"; then
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
fi
AC_LANG_SAVE
AC_LANG_C
AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])
AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
AC_LANG_RESTORE
if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"
then
#
# If both library and header were found, action-if-found
#
m4_ifblank([$1],[
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
LIBS="-lz $LIBS"
AC_DEFINE([HAVE_LIBZ], [1],
[Define to 1 if you have `z' library (-lz)])
],[
# Restore variables
LDFLAGS="$ZLIB_OLD_LDFLAGS"
CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
$1
])
else
#
# If either header or library was not found, action-if-not-found
#
m4_default([$2],[
AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])
])
fi
fi
])

214
m4_ax_pkg_config.m4 Normal file
View file

@ -0,0 +1,214 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR

507
main.c
View file

@ -1,507 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
#include <termios.h>
#include <unistd.h>
#include <assert.h>
#if (READLINE == GNU)
#include <readline/readline.h>
#else
#include <editline/readline.h>
#endif
#include <sys/stat.h>
#include <time.h>
#include <fcntl.h>
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
#include <signal.h>
#ifdef HAVE_LIBCONFIG
#include <libconfig.h>
#endif
#include "telegram.h"
#include "loop.h"
#include "mtproto-client.h"
#include "interface.h"
#include "tools.h"
#ifdef USE_LUA
# include "lua-tg.h"
#endif
#define PROGNAME "telegram-client"
#define VERSION "0.01"
#define CONFIG_DIRECTORY "." PROG_NAME
#define CONFIG_FILE "config"
#define AUTH_KEY_FILE "auth"
#define STATE_FILE "state"
#define SECRET_CHAT_FILE "secret"
#define DOWNLOADS_DIRECTORY "downloads"
#define BINLOG_FILE "binlog"
#define CONFIG_DIRECTORY_MODE 0700
#define DEFAULT_CONFIG_CONTENTS \
"# This is an empty config file\n" \
"# Feel free to put something here\n"
char *default_username;
char *auth_token;
int msg_num_mode;
char *config_filename;
char *prefix;
int test_dc;
char *auth_file_name;
char *state_file_name;
char *secret_chat_file_name;
char *downloads_directory;
char *config_directory;
char *binlog_file_name;
int binlog_enabled;
extern int log_level;
int sync_from_start;
int allow_weak_random;
void set_default_username (const char *s) {
if (default_username) {
tfree_str (default_username);
}
default_username = tstrdup (s);
}
/* {{{ TERMINAL */
static struct termios term_in, term_out;
static int term_set_in;
static int term_set_out;
void get_terminal_attributes (void) {
if (tcgetattr (STDIN_FILENO, &term_in) < 0) {
} else {
term_set_in = 1;
}
if (tcgetattr (STDOUT_FILENO, &term_out) < 0) {
} else {
term_set_out = 1;
}
}
void set_terminal_attributes (void) {
if (term_set_in) {
if (tcsetattr (STDIN_FILENO, 0, &term_in) < 0) {
perror ("tcsetattr()");
}
}
if (term_set_out) {
if (tcsetattr (STDOUT_FILENO, 0, &term_out) < 0) {
perror ("tcsetattr()");
}
}
}
/* }}} */
char *get_home_directory (void) {
static char *home_directory = NULL;
if (home_directory != NULL) {
return home_directory;
}
struct passwd *current_passwd;
uid_t user_id;
setpwent ();
user_id = getuid ();
while ((current_passwd = getpwent ())) {
if (current_passwd->pw_uid == user_id) {
home_directory = tstrdup (current_passwd->pw_dir);
break;
}
}
endpwent ();
if (home_directory == NULL) {
home_directory = tstrdup (".");
}
return home_directory;
}
char *get_config_directory (void) {
char *config_directory;
tasprintf (&config_directory, "%s/" CONFIG_DIRECTORY, get_home_directory ());
return config_directory;
}
char *get_config_filename (void) {
return config_filename;
}
char *get_auth_key_filename (void) {
return auth_file_name;
}
char *get_state_filename (void) {
return state_file_name;
}
char *get_secret_chat_filename (void) {
return secret_chat_file_name;
}
char *get_downloads_directory (void) {
return downloads_directory;
}
char *get_binlog_file_name (void) {
return binlog_file_name;
}
char *make_full_path (char *s) {
if (*s != '/') {
char *t = s;
tasprintf (&s, "%s/%s", get_home_directory (), s);
tfree_str (t);
}
return s;
}
void check_type_sizes (void) {
if (sizeof (int) != 4u) {
logprintf ("sizeof (int) isn't equal 4.\n");
exit (1);
}
if (sizeof (char) != 1u) {
logprintf ("sizeof (char) isn't equal 1.\n");
exit (1);
}
}
void running_for_first_time (void) {
check_type_sizes ();
if (config_filename) {
return; // Do not create custom config file
}
tasprintf (&config_filename, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, CONFIG_FILE);
config_filename = make_full_path (config_filename);
int config_file_fd;
char *config_directory = get_config_directory ();
//char *downloads_directory = get_downloads_directory ();
if (!mkdir (config_directory, CONFIG_DIRECTORY_MODE)) {
printf ("[%s] created\n", config_directory);
}
tfree_str (config_directory);
config_directory = NULL;
// see if config file is there
if (access (config_filename, R_OK) != 0) {
// config file missing, so touch it
config_file_fd = open (config_filename, O_CREAT | O_RDWR, 0600);
if (config_file_fd == -1) {
perror ("open[config_file]");
exit (EXIT_FAILURE);
}
if (write (config_file_fd, DEFAULT_CONFIG_CONTENTS, strlen (DEFAULT_CONFIG_CONTENTS)) <= 0) {
perror ("write[config_file]");
exit (EXIT_FAILURE);
}
close (config_file_fd);
/*int auth_file_fd = open (get_auth_key_filename (), O_CREAT | O_RDWR, 0600);
int x = -1;
assert (write (auth_file_fd, &x, 4) == 4);
close (auth_file_fd);
printf ("[%s] created\n", config_filename);*/
/* create downloads directory */
/*if (mkdir (downloads_directory, 0755) !=0) {
perror ("creating download directory");
exit (EXIT_FAILURE);
}*/
}
}
#ifdef HAVE_LIBCONFIG
void parse_config_val (config_t *conf, char **s, char *param_name, const char *default_name, const char *path) {
static char buf[1000];
int l = 0;
if (prefix) {
l = strlen (prefix);
memcpy (buf, prefix, l);
buf[l ++] = '.';
}
*s = 0;
const char *r = 0;
strcpy (buf + l, param_name);
config_lookup_string (conf, buf, &r);
if (r) {
if (path) {
tasprintf (s, "%s/%s", path, r);
} else {
*s = tstrdup (r);
}
} else {
if (path) {
tasprintf (s, "%s/%s", path, default_name);
} else {
*s = tstrdup (default_name);
}
}
}
void parse_config (void) {
config_filename = make_full_path (config_filename);
config_t conf;
config_init (&conf);
if (config_read_file (&conf, config_filename) != CONFIG_TRUE) {
fprintf (stderr, "Can not read config '%s': error '%s' on the line %d\n", config_filename, config_error_text (&conf), config_error_line (&conf));
exit (2);
}
if (!prefix) {
config_lookup_string (&conf, "default_profile", (void *)&prefix);
}
static char buf[1000];
int l = 0;
if (prefix) {
l = strlen (prefix);
memcpy (buf, prefix, l);
buf[l ++] = '.';
}
test_dc = 0;
strcpy (buf + l, "test");
config_lookup_bool (&conf, buf, &test_dc);
strcpy (buf + l, "log_level");
long long t = log_level;
config_lookup_int (&conf, buf, (void *)&t);
log_level = t;
if (!msg_num_mode) {
strcpy (buf + l, "msg_num");
config_lookup_bool (&conf, buf, &msg_num_mode);
}
parse_config_val (&conf, &config_directory, "config_directory", CONFIG_DIRECTORY, 0);
config_directory = make_full_path (config_directory);
parse_config_val (&conf, &auth_file_name, "auth_file", AUTH_KEY_FILE, config_directory);
parse_config_val (&conf, &state_file_name, "state_file", STATE_FILE, config_directory);
parse_config_val (&conf, &secret_chat_file_name, "secret", SECRET_CHAT_FILE, config_directory);
parse_config_val (&conf, &downloads_directory, "downloads", DOWNLOADS_DIRECTORY, config_directory);
parse_config_val (&conf, &binlog_file_name, "binlog", BINLOG_FILE, config_directory);
strcpy (buf + l, "binlog_enabled");
config_lookup_bool (&conf, buf, &binlog_enabled);
if (!mkdir (config_directory, CONFIG_DIRECTORY_MODE)) {
printf ("[%s] created\n", config_directory);
}
if (!mkdir (downloads_directory, CONFIG_DIRECTORY_MODE)) {
printf ("[%s] created\n", downloads_directory);
}
}
#else
void parse_config (void) {
printf ("libconfig not enabled\n");
tasprintf (&auth_file_name, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, AUTH_KEY_FILE);
tasprintf (&state_file_name, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, STATE_FILE);
tasprintf (&secret_chat_file_name, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, SECRET_CHAT_FILE);
tasprintf (&downloads_directory, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, DOWNLOADS_DIRECTORY);
tasprintf (&binlog_file_name, "%s/%s/%s", get_home_directory (), CONFIG_DIRECTORY, BINLOG_FILE);
}
#endif
void inner_main (void) {
loop ();
}
void usage (void) {
printf ("%s Usage\n", PROGNAME);
printf (" -h this help list\n");
printf (" -u username specify username\n");
printf (" -k public-key specify server public key\n");
printf (" -v verbose\n");
printf (" -l [1-3] log level\n");
printf (" -L log-file log net file\n");
printf (" -N message num mode\n");
printf (" -c config-file specify config file\n");
printf (" -p prefix specify prefix\n");
printf (" -R register mode\n");
printf (" -f sync from start\n");
printf (" -B enable binlog\n");
printf (" -E disable auto accept\n");
printf (" -w allow weak random\n");
printf (" -s specify lua script\n");
printf (" -W wait dialog list\n");
printf ("\n");
exit (1);
}
extern char *rsa_public_key_name;
extern int verbosity;
extern int default_dc_num;
char *log_net_file;
FILE *log_net_f;
int register_mode;
int disable_auto_accept;
int wait_dialog_list;
char *lua_file;
void args_parse (int argc, char **argv) {
int opt = 0;
while ((opt = getopt (argc, argv, "u:hk:vn:Nc:p:l:RfBL:Es:wW")) != -1) {
switch (opt) {
case 'u':
set_default_username (optarg);
break;
case 'k':
rsa_public_key_name = tstrdup (optarg);
break;
case 'v':
verbosity ++;
break;
case 'N':
msg_num_mode ++;
break;
case 'c':
config_filename = tstrdup (optarg);
break;
case 'p':
prefix = tstrdup (optarg);
assert (strlen (prefix) <= 100);
break;
case 'l':
log_level = atoi (optarg);
break;
case 'R':
register_mode = 1;
break;
case 'f':
sync_from_start = 1;
break;
case 'B':
binlog_enabled = 1;
break;
case 'L':
if (log_net_file) {
usage ();
}
log_net_file = tstrdup (optarg);
log_net_f = fopen (log_net_file, "a");
assert (log_net_f);
break;
case 'E':
disable_auto_accept = 1;
break;
case 'w':
allow_weak_random = 1;
break;
case 's':
lua_file = tstrdup (optarg);
break;
case 'W':
wait_dialog_list = 1;
break;
case 'h':
default:
usage ();
break;
}
}
}
#ifdef HAVE_EXECINFO_H
void print_backtrace (void) {
void *buffer[255];
const int calls = backtrace (buffer, sizeof (buffer) / sizeof (void *));
backtrace_symbols_fd (buffer, calls, 1);
}
#else
void print_backtrace (void) {
if (write (1, "No libexec. Backtrace disabled\n", 32) < 0) {
// Sad thing
}
}
#endif
void sig_segv_handler (int signum __attribute__ ((unused))) {
set_terminal_attributes ();
if (write (1, "SIGSEGV received\n", 18) < 0) {
// Sad thing
}
print_backtrace ();
exit (EXIT_FAILURE);
}
void sig_abrt_handler (int signum __attribute__ ((unused))) {
set_terminal_attributes ();
if (write (1, "SIGABRT received\n", 18) < 0) {
// Sad thing
}
print_backtrace ();
exit (EXIT_FAILURE);
}
int main (int argc, char **argv) {
signal (SIGSEGV, sig_segv_handler);
signal (SIGABRT, sig_abrt_handler);
log_level = 10;
args_parse (argc, argv);
printf (
"Telegram-client version " TG_VERSION ", Copyright (C) 2013 Vitaly Valtman\n"
"Telegram-client comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.\n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; type `show_license' for details.\n"
);
running_for_first_time ();
parse_config ();
get_terminal_attributes ();
#ifdef USE_LUA
if (lua_file) {
lua_init (lua_file);
}
#endif
inner_main ();
return 0;
}

172
msglog.c Normal file
View file

@ -0,0 +1,172 @@
/*
This file is part of telegram-purple
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014-2015
*/
#include <stdio.h>
#include <stdarg.h>
#include "telegram-purple.h"
/*
msglog.c: Convenience methods for logging to libpurple log
*/
void log_level_printf (const char* format, va_list ap, int level) {
char buffer[256];
vsnprintf (buffer, sizeof(buffer), format, ap);
int last = (int)strlen (buffer) - 1;
if (last >= 2 && buffer[last] == '\n') {
buffer[last] = '\0';
}
purple_debug (level, PLUGIN_ID, "%s\n", buffer);
}
void debug(const char* format, ...) {
va_list ap;
va_start (ap, format);
log_level_printf (format, ap, PURPLE_DEBUG_MISC);
va_end (ap);
}
void info(const char* format, ...) {
va_list ap;
va_start (ap, format);
log_level_printf (format, ap, PURPLE_DEBUG_INFO);
va_end (ap);
}
void warning(const char* format, ...) {
va_list ap;
va_start (ap, format);
log_level_printf (format, ap, PURPLE_DEBUG_WARNING);
va_end (ap);
}
void failure(const char* format, ...) {
va_list ap;
va_start (ap, format);
log_level_printf (format, ap, PURPLE_DEBUG_ERROR);
va_end (ap);
}
void fatal(const char* format, ...) {
va_list ap;
va_start (ap, format);
log_level_printf (format, ap, PURPLE_DEBUG_FATAL);
va_end (ap);
info ("\n");
}
const char *print_flags (const char **names, int len, unsigned flags) {
static char *text = NULL;
if (text) {
g_free (text);
text = NULL;
}
int i;
for (i = 0; i < len; i ++) {
if (flags & 1) {
char *new;
if (text) {
new = g_strconcat (text, " ", names[i], NULL);
g_free (text);
} else {
new = g_strdup (names[i]);
}
text = new;
}
flags >>= 1;
}
return (const char*)text;
}
const char *print_flags_peer (unsigned flags) {
const char *names[] = {
"CREATED",
"HAS_PHOTO",
"DELETED",
"OFFICIAL",
"KICKED",
"ADMIN",
"CREATOR",
"LEFT",
"DEACTIVATED"
};
return print_flags (names, 9, flags);
}
const char *print_flags_channel (unsigned flags) {
static char *text;
if (text) {
g_free (text);
text = NULL;
}
const char *names[] = {
"BROADCAST",
"EDITOR",
"MODERATOR",
"MEGAGROUP"
};
text = g_strdup (print_flags_peer (flags));
char *old = text;
text = g_strconcat (text, " ", print_flags (names, 4, flags >> 16), NULL);
g_free (old);
return text;
}
const char *print_flags_user (unsigned flags) {
static char *text;
if (text) {
g_free (text);
text = NULL;
}
const char *names[] = {
"CONTACT",
"MUTUAL_CONTACT",
"BLOCKED",
"SELF",
"BOT"
};
text = g_strdup (print_flags_peer (flags));
char *old = text;
text = g_strconcat (text, " ", print_flags (names, 5, flags >> 16), NULL);
g_free (old);
return text;
}
const char *print_flags_update (unsigned flags) {
const char *names[] = {
"CREATED",
"DELETED",
"PHONE",
"CONTACT",
"PHOTO",
"BLOCKED",
"REAL_NAME",
"NAME",
"REQUESTED",
"WORKING",
"FLAGS",
"TITLE",
"ADMIN",
"MEMBERS",
"ACCESS_HASH",
"USERNAME"
};
return print_flags (names, 16, flags);
}

30
msglog.h Normal file
View file

@ -0,0 +1,30 @@
/*
This file is part of telegram-purple
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014-2015
*/
#include <stdarg.h>
void debug(const char* format, ...);
void info(const char* format, ...);
void warning(const char* format, ...);
void failure(const char* format, ...);
void fatal(const char* format, ...);
const char *print_flags_update (unsigned update);
const char *print_flags_channel (unsigned flags);
const char *print_flags_peer (unsigned flags);
const char *print_flags_user (unsigned flags);

File diff suppressed because it is too large Load diff

View file

@ -1,33 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
*/
#ifndef __MTPROTO_CLIENT_H__
#define __MTPROTO_CLIENT_H__
#include "net.h"
#include <openssl/bn.h>
void on_start (void);
long long encrypt_send_message (struct connection *c, int *msg, int msg_ints, int useful);
void dc_authorize (struct dc *DC);
void work_update (struct connection *c, long long msg_id);
void work_update_binlog (void);
int check_g (unsigned char p[256], BIGNUM *g);
int check_g_bn (BIGNUM *p, BIGNUM *g);
int check_DH_params (BIGNUM *p, int g);
void secure_random (void *s, int l);
#endif

View file

@ -1,411 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _FILE_OFFSET_BITS 64
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <netdb.h>
#include <openssl/bn.h>
#include <openssl/rand.h>
#include <openssl/pem.h>
#include <openssl/aes.h>
#include <openssl/sha.h>
#include "mtproto-common.h"
#include "interface.h"
#include "include.h"
#ifdef __MACH__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
int __packet_buffer[PACKET_BUFFER_SIZE], *packet_ptr;
int *packet_buffer = __packet_buffer + 16;
long long rsa_encrypted_chunks, rsa_decrypted_chunks;
BN_CTX *BN_ctx;
int verbosity;
int get_random_bytes (unsigned char *buf, int n) {
int r = 0, h = open ("/dev/random", O_RDONLY | O_NONBLOCK);
if (h >= 0) {
r = read (h, buf, n);
if (r > 0) {
if (verbosity >= 3) {
logprintf ( "added %d bytes of real entropy to secure random numbers seed\n", r);
}
} else {
r = 0;
}
close (h);
}
if (r < n) {
h = open ("/dev/urandom", O_RDONLY);
if (h < 0) {
return r;
}
int s = read (h, buf + r, n - r);
close (h);
if (s > 0) {
r += s;
}
}
if (r >= (int) sizeof (long)) {
*(long *)buf ^= lrand48 ();
srand48 (*(long *)buf);
}
return r;
}
void my_clock_gettime (int clock_id UU, struct timespec *T) {
#ifdef __MACH__
// We are ignoring MONOTONIC and hope time doesn't go back to often
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
T->tv_sec = mts.tv_sec;
T->tv_nsec = mts.tv_nsec;
#else
assert (clock_gettime(clock_id, T) >= 0);
#endif
}
/* RDTSC */
#if defined(__i386__)
#define HAVE_RDTSC
static __inline__ unsigned long long rdtsc (void) {
unsigned long long int x;
__asm__ volatile ("rdtsc" : "=A" (x));
return x;
}
#elif defined(__x86_64__)
#define HAVE_RDTSC
static __inline__ unsigned long long rdtsc (void) {
unsigned hi, lo;
__asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
return ((unsigned long long) lo) | (((unsigned long long) hi) << 32);
}
#endif
void prng_seed (const char *password_filename, int password_length) {
struct timespec T;
my_clock_gettime (CLOCK_REALTIME, &T);
RAND_add (&T, sizeof (T), 4.0);
#ifdef HAVE_RDTSC
unsigned long long r = rdtsc ();
RAND_add (&r, 8, 4.0);
#endif
unsigned short p = getpid ();
RAND_add (&p, sizeof (p), 0.0);
p = getppid ();
RAND_add (&p, sizeof (p), 0.0);
unsigned char rb[32];
int s = get_random_bytes (rb, 32);
if (s > 0) {
RAND_add (rb, s, s);
}
memset (rb, 0, sizeof (rb));
if (password_filename && password_length > 0) {
int fd = open (password_filename, O_RDONLY);
if (fd < 0) {
logprintf ( "Warning: fail to open password file - \"%s\", %m.\n", password_filename);
} else {
unsigned char *a = talloc0 (password_length);
int l = read (fd, a, password_length);
if (l < 0) {
logprintf ( "Warning: fail to read password file - \"%s\", %m.\n", password_filename);
} else {
if (verbosity > 0) {
logprintf ( "read %d bytes from password file.\n", l);
}
RAND_add (a, l, l);
}
close (fd);
tfree_secure (a, password_length);
}
}
BN_ctx = BN_CTX_new ();
ensure_ptr (BN_ctx);
}
int serialize_bignum (BIGNUM *b, char *buffer, int maxlen) {
int itslen = BN_num_bytes (b);
int reqlen;
if (itslen < 254) {
reqlen = itslen + 1;
} else {
reqlen = itslen + 4;
}
int newlen = (reqlen + 3) & -4;
int pad = newlen - reqlen;
reqlen = newlen;
if (reqlen > maxlen) {
return -reqlen;
}
if (itslen < 254) {
*buffer++ = itslen;
} else {
*(int *)buffer = (itslen << 8) + 0xfe;
buffer += 4;
}
int l = BN_bn2bin (b, (unsigned char *)buffer);
assert (l == itslen);
buffer += l;
while (pad --> 0) {
*buffer++ = 0;
}
return reqlen;
}
long long compute_rsa_key_fingerprint (RSA *key) {
static char tempbuff[4096];
static unsigned char sha[20];
assert (key->n && key->e);
int l1 = serialize_bignum (key->n, tempbuff, 4096);
assert (l1 > 0);
int l2 = serialize_bignum (key->e, tempbuff + l1, 4096 - l1);
assert (l2 > 0 && l1 + l2 <= 4096);
SHA1 ((unsigned char *)tempbuff, l1 + l2, sha);
return *(long long *)(sha + 12);
}
void out_cstring (const char *str, long len) {
assert (len >= 0 && len < (1 << 24));
assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));
char *dest = (char *) packet_ptr;
if (len < 254) {
*dest++ = len;
} else {
*packet_ptr = (len << 8) + 0xfe;
dest += 4;
}
memcpy (dest, str, len);
dest += len;
while ((long) dest & 3) {
*dest++ = 0;
}
packet_ptr = (int *) dest;
}
void out_cstring_careful (const char *str, long len) {
assert (len >= 0 && len < (1 << 24));
assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));
char *dest = (char *) packet_ptr;
if (len < 254) {
dest++;
if (dest != str) {
memmove (dest, str, len);
}
dest[-1] = len;
} else {
dest += 4;
if (dest != str) {
memmove (dest, str, len);
}
*packet_ptr = (len << 8) + 0xfe;
}
dest += len;
while ((long) dest & 3) {
*dest++ = 0;
}
packet_ptr = (int *) dest;
}
void out_data (const void *data, long len) {
assert (len >= 0 && len < (1 << 24) && !(len & 3));
assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));
memcpy (packet_ptr, data, len);
packet_ptr += len >> 2;
}
int *in_ptr, *in_end;
int fetch_bignum (BIGNUM *x) {
int l = prefetch_strlen ();
if (l < 0) {
return l;
}
char *str = fetch_str (l);
assert (BN_bin2bn ((unsigned char *) str, l, x) == x);
return l;
}
int pad_rsa_encrypt (char *from, int from_len, char *to, int size, BIGNUM *N, BIGNUM *E) {
int pad = (255000 - from_len - 32) % 255 + 32;
int chunks = (from_len + pad) / 255;
int bits = BN_num_bits (N);
assert (bits >= 2041 && bits <= 2048);
assert (from_len > 0 && from_len <= 2550);
assert (size >= chunks * 256);
assert (RAND_pseudo_bytes ((unsigned char *) from + from_len, pad) >= 0);
int i;
BIGNUM x, y;
BN_init (&x);
BN_init (&y);
rsa_encrypted_chunks += chunks;
for (i = 0; i < chunks; i++) {
BN_bin2bn ((unsigned char *) from, 255, &x);
assert (BN_mod_exp (&y, &x, E, N, BN_ctx) == 1);
unsigned l = 256 - BN_num_bytes (&y);
assert (l <= 256);
memset (to, 0, l);
BN_bn2bin (&y, (unsigned char *) to + l);
to += 256;
}
BN_free (&x);
BN_free (&y);
return chunks * 256;
}
int pad_rsa_decrypt (char *from, int from_len, char *to, int size, BIGNUM *N, BIGNUM *D) {
if (from_len < 0 || from_len > 0x1000 || (from_len & 0xff)) {
return -1;
}
int chunks = (from_len >> 8);
int bits = BN_num_bits (N);
assert (bits >= 2041 && bits <= 2048);
assert (size >= chunks * 255);
int i;
BIGNUM x, y;
BN_init (&x);
BN_init (&y);
for (i = 0; i < chunks; i++) {
++rsa_decrypted_chunks;
BN_bin2bn ((unsigned char *) from, 256, &x);
assert (BN_mod_exp (&y, &x, D, N, BN_ctx) == 1);
int l = BN_num_bytes (&y);
if (l > 255) {
BN_free (&x);
BN_free (&y);
return -1;
}
assert (l >= 0 && l <= 255);
memset (to, 0, 255 - l);
BN_bn2bin (&y, (unsigned char *) to + 255 - l);
to += 255;
}
BN_free (&x);
BN_free (&y);
return chunks * 255;
}
unsigned char aes_key_raw[32], aes_iv[32];
AES_KEY aes_key;
void init_aes_unauth (const char server_nonce[16], const char hidden_client_nonce[32], int encrypt) {
static unsigned char buffer[64], hash[20];
memcpy (buffer, hidden_client_nonce, 32);
memcpy (buffer + 32, server_nonce, 16);
SHA1 (buffer, 48, aes_key_raw);
memcpy (buffer + 32, hidden_client_nonce, 32);
SHA1 (buffer, 64, aes_iv + 8);
memcpy (buffer, server_nonce, 16);
memcpy (buffer + 16, hidden_client_nonce, 32);
SHA1 (buffer, 48, hash);
memcpy (aes_key_raw + 20, hash, 12);
memcpy (aes_iv, hash + 12, 8);
memcpy (aes_iv + 28, hidden_client_nonce, 4);
if (encrypt == AES_ENCRYPT) {
AES_set_encrypt_key (aes_key_raw, 32*8, &aes_key);
} else {
AES_set_decrypt_key (aes_key_raw, 32*8, &aes_key);
}
memset (aes_key_raw, 0, sizeof (aes_key_raw));
}
void init_aes_auth (char auth_key[192], char msg_key[16], int encrypt) {
static unsigned char buffer[48], hash[20];
// sha1_a = SHA1 (msg_key + substr (auth_key, 0, 32));
// sha1_b = SHA1 (substr (auth_key, 32, 16) + msg_key + substr (auth_key, 48, 16));
// sha1_с = SHA1 (substr (auth_key, 64, 32) + msg_key);
// sha1_d = SHA1 (msg_key + substr (auth_key, 96, 32));
// aes_key = substr (sha1_a, 0, 8) + substr (sha1_b, 8, 12) + substr (sha1_c, 4, 12);
// aes_iv = substr (sha1_a, 8, 12) + substr (sha1_b, 0, 8) + substr (sha1_c, 16, 4) + substr (sha1_d, 0, 8);
memcpy (buffer, msg_key, 16);
memcpy (buffer + 16, auth_key, 32);
SHA1 (buffer, 48, hash);
memcpy (aes_key_raw, hash, 8);
memcpy (aes_iv, hash + 8, 12);
memcpy (buffer, auth_key + 32, 16);
memcpy (buffer + 16, msg_key, 16);
memcpy (buffer + 32, auth_key + 48, 16);
SHA1 (buffer, 48, hash);
memcpy (aes_key_raw + 8, hash + 8, 12);
memcpy (aes_iv + 12, hash, 8);
memcpy (buffer, auth_key + 64, 32);
memcpy (buffer + 32, msg_key, 16);
SHA1 (buffer, 48, hash);
memcpy (aes_key_raw + 20, hash + 4, 12);
memcpy (aes_iv + 20, hash + 16, 4);
memcpy (buffer, msg_key, 16);
memcpy (buffer + 16, auth_key + 96, 32);
SHA1 (buffer, 48, hash);
memcpy (aes_iv + 24, hash, 8);
if (encrypt == AES_ENCRYPT) {
AES_set_encrypt_key (aes_key_raw, 32*8, &aes_key);
} else {
AES_set_decrypt_key (aes_key_raw, 32*8, &aes_key);
}
memset (aes_key_raw, 0, sizeof (aes_key_raw));
}
int pad_aes_encrypt (char *from, int from_len, char *to, int size) {
int padded_size = (from_len + 15) & -16;
assert (from_len > 0 && padded_size <= size);
if (from_len < padded_size) {
assert (RAND_pseudo_bytes ((unsigned char *) from + from_len, padded_size - from_len) >= 0);
}
AES_ige_encrypt ((unsigned char *) from, (unsigned char *) to, padded_size, &aes_key, aes_iv, AES_ENCRYPT);
return padded_size;
}
int pad_aes_decrypt (char *from, int from_len, char *to, int size) {
if (from_len <= 0 || from_len > size || (from_len & 15)) {
return -1;
}
AES_ige_encrypt ((unsigned char *) from, (unsigned char *) to, from_len, &aes_key, aes_iv, AES_DECRYPT);
return from_len;
}

View file

@ -1,355 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
*/
#ifndef __MTPROTO_COMMON_H__
#define __MTPROTO_COMMON_H__
#include <string.h>
#include <openssl/rsa.h>
#include <openssl/bn.h>
#include <openssl/aes.h>
#include <stdio.h>
#include "interface.h"
#include "tools.h"
#include "constants.h"
/* DH key exchange protocol data structures */
#define CODE_req_pq 0x60469778
#define CODE_resPQ 0x05162463
#define CODE_req_DH_params 0xd712e4be
#define CODE_p_q_inner_data 0x83c95aec
#define CODE_server_DH_inner_data 0xb5890dba
#define CODE_server_DH_params_fail 0x79cb045d
#define CODE_server_DH_params_ok 0xd0e8075c
#define CODE_set_client_DH_params 0xf5045f1f
#define CODE_client_DH_inner_data 0x6643b654
#define CODE_dh_gen_ok 0x3bcbf734
#define CODE_dh_gen_retry 0x46dc1fb9
#define CODE_dh_gen_fail 0xa69dae02
/* service messages */
#define CODE_rpc_result 0xf35c6d01
#define CODE_rpc_error 0x2144ca19
#define CODE_msg_container 0x73f1f8dc
#define CODE_msg_copy 0xe06046b2
#define CODE_msgs_ack 0x62d6b459
#define CODE_bad_msg_notification 0xa7eff811
#define CODE_bad_server_salt 0xedab447b
#define CODE_msgs_state_req 0xda69fb52
#define CODE_msgs_state_info 0x04deb57d
#define CODE_msgs_all_info 0x8cc0d131
#define CODE_new_session_created 0x9ec20908
#define CODE_msg_resend_req 0x7d861a08
#define CODE_ping 0x7abe77ec
#define CODE_pong 0x347773c5
#define CODE_destroy_session 0xe7512126
#define CODE_destroy_session_ok 0xe22045fc
#define CODE_destroy_session_none 0x62d350c9
#define CODE_destroy_sessions 0x9a6face8
#define CODE_destroy_sessions_res 0xa8164668
#define CODE_get_future_salts 0xb921bd04
#define CODE_future_salt 0x0949d9dc
#define CODE_future_salts 0xae500895
#define CODE_rpc_drop_answer 0x58e4a740
#define CODE_rpc_answer_unknown 0x5e2ad36e
#define CODE_rpc_answer_dropped_running 0xcd78e586
#define CODE_rpc_answer_dropped 0xa43ad8b7
#define CODE_msg_detailed_info 0x276d3ec6
#define CODE_msg_new_detailed_info 0x809db6df
#define CODE_ping_delay_disconnect 0xf3427b8c
#define CODE_gzip_packed 0x3072cfa1
#define CODE_input_peer_notify_settings_old 0x3cf4b1be
#define CODE_peer_notify_settings_old 0xddbcd4a5
#define CODE_user_profile_photo_old 0x990d1493
#define CODE_config_old 0x232d5905
#define CODE_msg_new_detailed_info 0x809db6df
#define CODE_msg_detailed_info 0x276d3ec6
/* not really a limit, for struct encrypted_message only */
// #define MAX_MESSAGE_INTS 16384
#define MAX_MESSAGE_INTS 1048576
#define MAX_PROTO_MESSAGE_INTS 1048576
#define PACKET_BUFFER_SIZE (16384 * 100 + 16) // temp fix
#pragma pack(push,4)
struct encrypted_message {
// unencrypted header
long long auth_key_id;
char msg_key[16];
// encrypted part, starts with encrypted header
long long server_salt;
long long session_id;
// long long auth_key_id2; // removed
// first message follows
long long msg_id;
int seq_no;
int msg_len; // divisible by 4
int message[MAX_MESSAGE_INTS];
};
#pragma pack(pop)
BN_CTX *BN_ctx;
void prng_seed (const char *password_filename, int password_length);
int serialize_bignum (BIGNUM *b, char *buffer, int maxlen);
long long compute_rsa_key_fingerprint (RSA *key);
extern int *packet_buffer;
extern int *packet_ptr;
static inline void out_ints (const int *what, int len) {
assert (packet_ptr + len <= packet_buffer + PACKET_BUFFER_SIZE);
memcpy (packet_ptr, what, len * 4);
packet_ptr += len;
}
static inline void out_int (int x) {
assert (packet_ptr + 1 <= packet_buffer + PACKET_BUFFER_SIZE);
*packet_ptr++ = x;
}
static inline void out_long (long long x) {
assert (packet_ptr + 2 <= packet_buffer + PACKET_BUFFER_SIZE);
*(long long *)packet_ptr = x;
packet_ptr += 2;
}
static inline void clear_packet (void) {
packet_ptr = packet_buffer;
}
void out_cstring (const char *str, long len);
void out_cstring_careful (const char *str, long len);
void out_data (const void *data, long len);
static inline void out_string (const char *str) {
out_cstring (str, strlen (str));
}
static inline void out_bignum (BIGNUM *n) {
int l = serialize_bignum (n, (char *)packet_ptr, (PACKET_BUFFER_SIZE - (packet_ptr - packet_buffer)) * 4);
assert (l > 0);
packet_ptr += l >> 2;
}
extern int *in_ptr, *in_end;
void fetch_pts (void);
void fetch_qts (void);
void fetch_date (void);
void fetch_seq (void);
static inline int prefetch_strlen (void) {
if (in_ptr >= in_end) {
return -1;
}
unsigned l = *in_ptr;
if ((l & 0xff) < 0xfe) {
l &= 0xff;
return (in_end >= in_ptr + (l >> 2) + 1) ? (int)l : -1;
} else if ((l & 0xff) == 0xfe) {
l >>= 8;
return (l >= 254 && in_end >= in_ptr + ((l + 7) >> 2)) ? (int)l : -1;
} else {
return -1;
}
}
extern int verbosity;
static inline char *fetch_str (int len) {
assert (len >= 0);
if (verbosity > 6) {
logprintf ("fetch_string: len = %d\n", len);
}
if (len < 254) {
char *str = (char *) in_ptr + 1;
in_ptr += 1 + (len >> 2);
return str;
} else {
char *str = (char *) in_ptr + 4;
in_ptr += (len + 7) >> 2;
return str;
}
}
static inline char *fetch_str_dup (void) {
int l = prefetch_strlen ();
assert (l >= 0);
int i;
char *s = fetch_str (l);
for (i = 0; i < l; i++) {
if (!s[i]) { break; }
}
char *r = talloc (i + 1);
memcpy (r, s, i);
r[i] = 0;
return r;
}
static inline int fetch_update_str (char **s) {
if (!*s) {
*s = fetch_str_dup ();
return 1;
}
int l = prefetch_strlen ();
char *r = fetch_str (l);
if (memcmp (*s, r, l) || (*s)[l]) {
tfree_str (*s);
*s = talloc (l + 1);
memcpy (*s, r, l);
(*s)[l] = 0;
return 1;
}
return 0;
}
static inline int fetch_update_int (int *value) {
if (*value == *in_ptr) {
in_ptr ++;
return 0;
} else {
*value = *(in_ptr ++);
return 1;
}
}
static inline int fetch_update_long (long long *value) {
if (*value == *(long long *)in_ptr) {
in_ptr += 2;
return 0;
} else {
*value = *(long long *)(in_ptr);
in_ptr += 2;
return 1;
}
}
static inline int set_update_int (int *value, int new_value) {
if (*value == new_value) {
return 0;
} else {
*value = new_value;
return 1;
}
}
static inline void fetch_skip (int n) {
in_ptr += n;
assert (in_ptr <= in_end);
}
static inline void fetch_skip_str (void) {
int l = prefetch_strlen ();
assert (l >= 0);
fetch_str (l);
}
static inline long have_prefetch_ints (void) {
return in_end - in_ptr;
}
int fetch_bignum (BIGNUM *x);
static inline int fetch_int (void) {
assert (in_ptr + 1 <= in_end);
if (verbosity > 6) {
logprintf ("fetch_int: 0x%08x (%d)\n", *in_ptr, *in_ptr);
}
return *(in_ptr ++);
}
static inline int fetch_bool (void) {
if (verbosity > 6) {
logprintf ("fetch_bool: 0x%08x (%d)\n", *in_ptr, *in_ptr);
}
assert (in_ptr + 1 <= in_end);
assert (*(in_ptr) == (int)CODE_bool_true || *(in_ptr) == (int)CODE_bool_false);
return *(in_ptr ++) == (int)CODE_bool_true;
}
static inline int prefetch_int (void) {
assert (in_ptr < in_end);
return *(in_ptr);
}
static inline void prefetch_data (void *data, int size) {
assert (in_ptr + (size >> 2) <= in_end);
memcpy (data, in_ptr, size);
}
static inline void fetch_data (void *data, int size) {
assert (in_ptr + (size >> 2) <= in_end);
memcpy (data, in_ptr, size);
assert (!(size & 3));
in_ptr += (size >> 2);
}
static inline long long fetch_long (void) {
assert (in_ptr + 2 <= in_end);
long long r = *(long long *)in_ptr;
in_ptr += 2;
return r;
}
static inline double fetch_double (void) {
assert (in_ptr + 2 <= in_end);
double r = *(double *)in_ptr;
in_ptr += 2;
return r;
}
static inline void fetch_ints (void *data, int count) {
assert (in_ptr + count <= in_end);
memcpy (data, in_ptr, 4 * count);
in_ptr += count;
}
int get_random_bytes (unsigned char *buf, int n);
int pad_rsa_encrypt (char *from, int from_len, char *to, int size, BIGNUM *N, BIGNUM *E);
int pad_rsa_decrypt (char *from, int from_len, char *to, int size, BIGNUM *N, BIGNUM *D);
extern long long rsa_encrypted_chunks, rsa_decrypted_chunks;
extern unsigned char aes_key_raw[32], aes_iv[32];
extern AES_KEY aes_key;
void init_aes_unauth (const char server_nonce[16], const char hidden_client_nonce[32], int encrypt);
void init_aes_auth (char auth_key[192], char msg_key[16], int encrypt);
int pad_aes_encrypt (char *from, int from_len, char *to, int size);
int pad_aes_decrypt (char *from, int from_len, char *to, int size);
static inline void hexdump_in (void) {
hexdump (in_ptr, in_end);
}
static inline void hexdump_out (void) {
hexdump (packet_buffer, packet_ptr);
}
#ifdef __MACH__
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1
#endif
void my_clock_gettime (int clock_id, struct timespec *T);
#endif

647
net.c
View file

@ -1,647 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <poll.h>
#include <openssl/rand.h>
#include <arpa/inet.h>
#include "net.h"
#include "include.h"
#include "mtproto-client.h"
#include "mtproto-common.h"
#include "tree.h"
#include "interface.h"
#ifndef POLLRDHUP
#define POLLRDHUP 0
#endif
#define long_cmp(a,b) ((a) > (b) ? 1 : (a) == (b) ? 0 : -1)
DEFINE_TREE(long,long long,long_cmp,0)
double get_utime (int clock_id);
int verbosity;
extern struct connection_methods auth_methods;
extern FILE *log_net_f;
void fail_connection (struct connection *c);
#define PING_TIMEOUT 10
void start_ping_timer (struct connection *c);
int ping_alarm (struct connection *c) {
if (verbosity > 2) {
logprintf ("ping alarm\n");
}
assert (c->state == conn_ready || c->state == conn_connecting);
if (get_double_time () - c->last_receive_time > 20 * PING_TIMEOUT) {
if (verbosity) {
logprintf ( "fail connection: reason: ping timeout\n");
}
c->state = conn_failed;
fail_connection (c);
} else if (get_double_time () - c->last_receive_time > 5 * PING_TIMEOUT && c->state == conn_ready) {
int x[3];
x[0] = CODE_ping;
*(long long *)(x + 1) = lrand48 () * (1ll << 32) + lrand48 ();
encrypt_send_message (c, x, 3, 0);
start_ping_timer (c);
} else {
start_ping_timer (c);
}
return 0;
}
void stop_ping_timer (struct connection *c) {
remove_event_timer (&c->ev);
}
void start_ping_timer (struct connection *c) {
c->ev.timeout = get_double_time () + PING_TIMEOUT;
c->ev.alarm = (void *)ping_alarm;
c->ev.self = c;
insert_event_timer (&c->ev);
}
void restart_connection (struct connection *c);
int fail_alarm (void *ev) {
((struct connection *)ev)->in_fail_timer = 0;
restart_connection (ev);
return 0;
}
void start_fail_timer (struct connection *c) {
if (c->in_fail_timer) { return; }
c->in_fail_timer = 1;
c->ev.timeout = get_double_time () + 10;
c->ev.alarm = (void *)fail_alarm;
c->ev.self = c;
insert_event_timer (&c->ev);
}
struct connection_buffer *new_connection_buffer (int size) {
struct connection_buffer *b = talloc0 (sizeof (*b));
b->start = talloc (size);
b->end = b->start + size;
b->rptr = b->wptr = b->start;
return b;
}
void delete_connection_buffer (struct connection_buffer *b) {
tfree (b->start, b->end - b->start);
tfree (b, sizeof (*b));
}
int write_out (struct connection *c, const void *_data, int len) {
const unsigned char *data = _data;
if (!len) { return 0; }
assert (len > 0);
int x = 0;
if (!c->out_head) {
struct connection_buffer *b = new_connection_buffer (1 << 20);
c->out_head = c->out_tail = b;
}
while (len) {
if (c->out_tail->end - c->out_tail->wptr >= len) {
memcpy (c->out_tail->wptr, data, len);
c->out_tail->wptr += len;
c->out_bytes += len;
return x + len;
} else {
int y = c->out_tail->end - c->out_tail->wptr;
assert (y < len);
memcpy (c->out_tail->wptr, data, y);
x += y;
len -= y;
data += y;
struct connection_buffer *b = new_connection_buffer (1 << 20);
c->out_tail->next = b;
b->next = 0;
c->out_tail = b;
c->out_bytes += y;
}
}
return x;
}
int read_in (struct connection *c, void *_data, int len) {
unsigned char *data = _data;
if (!len) { return 0; }
assert (len > 0);
if (len > c->in_bytes) {
len = c->in_bytes;
}
int x = 0;
while (len) {
int y = c->in_head->wptr - c->in_head->rptr;
if (y > len) {
memcpy (data, c->in_head->rptr, len);
c->in_head->rptr += len;
c->in_bytes -= len;
return x + len;
} else {
memcpy (data, c->in_head->rptr, y);
c->in_bytes -= y;
x += y;
data += y;
len -= y;
void *old = c->in_head;
c->in_head = c->in_head->next;
if (!c->in_head) {
c->in_tail = 0;
}
delete_connection_buffer (old);
}
}
return x;
}
int read_in_lookup (struct connection *c, void *_data, int len) {
unsigned char *data = _data;
if (!len || !c->in_bytes) { return 0; }
assert (len > 0);
if (len > c->in_bytes) {
len = c->in_bytes;
}
int x = 0;
struct connection_buffer *b = c->in_head;
while (len) {
int y = b->wptr - b->rptr;
if (y >= len) {
memcpy (data, b->rptr, len);
return x + len;
} else {
memcpy (data, b->rptr, y);
x += y;
data += y;
len -= y;
b = b->next;
}
}
return x;
}
void flush_out (struct connection *c UU) {
}
#define MAX_CONNECTIONS 100
struct connection *Connections[MAX_CONNECTIONS];
int max_connection_fd;
void rotate_port (struct connection *c) {
switch (c->port) {
case 443:
c->port = 80;
break;
case 80:
c->port = 25;
break;
case 25:
c->port = 443;
break;
}
}
struct connection *create_connection (const char *host, int port, struct session *session, struct connection_methods *methods) {
struct connection *c = talloc0 (sizeof (*c));
int fd = socket (AF_INET, SOCK_STREAM, 0);
if (fd == -1) {
logprintf ("Can not create socket: %m\n");
exit (1);
}
assert (fd >= 0 && fd < MAX_CONNECTIONS);
if (fd > max_connection_fd) {
max_connection_fd = fd;
}
int flags = -1;
setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof (flags));
setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof (flags));
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags));
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons (port);
addr.sin_addr.s_addr = inet_addr (host);
fcntl (fd, F_SETFL, O_NONBLOCK);
if (connect (fd, (struct sockaddr *) &addr, sizeof (addr)) == -1) {
if (errno != EINPROGRESS) {
logprintf ( "Can not connect to %s:%d %m\n", host, port);
close (fd);
tfree (c, sizeof (*c));
return 0;
}
}
struct pollfd s;
s.fd = fd;
s.events = POLLOUT | POLLERR | POLLRDHUP | POLLHUP;
errno = 0;
while (poll (&s, 1, 10000) <= 0 || !(s.revents & POLLOUT)) {
if (errno == EINTR) { continue; }
if (errno) {
logprintf ("Problems in poll: %m\n");
exit (1);
}
logprintf ("Connect with %s:%d timeout\n", host, port);
close (fd);
tfree (c, sizeof (*c));
return 0;
}
c->session = session;
c->fd = fd;
c->ip = tstrdup (host);
c->flags = 0;
c->state = conn_ready;
c->methods = methods;
c->port = port;
assert (!Connections[fd]);
Connections[fd] = c;
if (verbosity) {
logprintf ( "connect to %s:%d successful\n", host, port);
}
if (c->methods->ready) {
c->methods->ready (c);
}
c->last_receive_time = get_double_time ();
start_ping_timer (c);
return c;
}
void restart_connection (struct connection *c) {
if (c->last_connect_time == time (0)) {
start_fail_timer (c);
return;
}
c->last_connect_time = time (0);
int fd = socket (AF_INET, SOCK_STREAM, 0);
if (fd == -1) {
logprintf ("Can not create socket: %m\n");
exit (1);
}
assert (fd >= 0 && fd < MAX_CONNECTIONS);
if (fd > max_connection_fd) {
max_connection_fd = fd;
}
int flags = -1;
setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof (flags));
setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof (flags));
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags));
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons (c->port);
addr.sin_addr.s_addr = inet_addr (c->ip);
fcntl (fd, F_SETFL, O_NONBLOCK);
if (connect (fd, (struct sockaddr *) &addr, sizeof (addr)) == -1) {
if (errno != EINPROGRESS) {
logprintf ( "Can not connect to %s:%d %m\n", c->ip, c->port);
start_fail_timer (c);
close (fd);
return;
}
}
c->fd = fd;
c->state = conn_connecting;
c->last_receive_time = get_double_time ();
start_ping_timer (c);
Connections[fd] = c;
char byte = 0xef;
assert (write_out (c, &byte, 1) == 1);
flush_out (c);
}
void fail_connection (struct connection *c) {
if (c->state == conn_ready || c->state == conn_connecting) {
stop_ping_timer (c);
}
rotate_port (c);
struct connection_buffer *b = c->out_head;
while (b) {
struct connection_buffer *d = b;
b = b->next;
delete_connection_buffer (d);
}
b = c->in_head;
while (b) {
struct connection_buffer *d = b;
b = b->next;
delete_connection_buffer (d);
}
c->out_head = c->out_tail = c->in_head = c->in_tail = 0;
c->state = conn_failed;
c->out_bytes = c->in_bytes = 0;
close (c->fd);
Connections[c->fd] = 0;
logprintf ("Lost connection to server... %s:%d\n", c->ip, c->port);
restart_connection (c);
}
extern FILE *log_net_f;
void try_write (struct connection *c) {
if (verbosity) {
logprintf ( "try write: fd = %d\n", c->fd);
}
int x = 0;
while (c->out_head) {
int r = write (c->fd, c->out_head->rptr, c->out_head->wptr - c->out_head->rptr);
if (r > 0 && log_net_f) {
fprintf (log_net_f, "%.02lf %d OUT %s:%d", get_utime (CLOCK_REALTIME), r, c->ip, c->port);
int i;
for (i = 0; i < r; i++) {
fprintf (log_net_f, " %02x", *(unsigned char *)(c->out_head->rptr + i));
}
fprintf (log_net_f, "\n");
fflush (log_net_f);
}
if (r >= 0) {
x += r;
c->out_head->rptr += r;
if (c->out_head->rptr != c->out_head->wptr) {
break;
}
struct connection_buffer *b = c->out_head;
c->out_head = b->next;
if (!c->out_head) {
c->out_tail = 0;
}
delete_connection_buffer (b);
} else {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (verbosity) {
logprintf ("fail_connection: write_error %m\n");
}
fail_connection (c);
return;
} else {
break;
}
}
}
if (verbosity) {
logprintf ( "Sent %d bytes to %d\n", x, c->fd);
}
c->out_bytes -= x;
}
void hexdump_buf (struct connection_buffer *b) {
int pos = 0;
int rem = 8;
while (b) {
unsigned char *c = b->rptr;
while (c != b->wptr) {
if (rem == 8) {
if (pos) { printf ("\n"); }
printf ("%04d", pos);
}
printf (" %02x", (int)*c);
rem --;
pos ++;
if (!rem) {
rem = 8;
}
c ++;
}
b = b->next;
}
printf ("\n");
}
void try_rpc_read (struct connection *c) {
assert (c->in_head);
if (verbosity >= 3) {
hexdump_buf (c->in_head);
}
while (1) {
if (c->in_bytes < 1) { return; }
unsigned len = 0;
unsigned t = 0;
assert (read_in_lookup (c, &len, 1) == 1);
if (len >= 1 && len <= 0x7e) {
if (c->in_bytes < (int)(1 + 4 * len)) { return; }
} else {
if (c->in_bytes < 4) { return; }
assert (read_in_lookup (c, &len, 4) == 4);
len = (len >> 8);
if (c->in_bytes < (int)(4 + 4 * len)) { return; }
len = 0x7f;
}
if (len >= 1 && len <= 0x7e) {
assert (read_in (c, &t, 1) == 1);
assert (t == len);
assert (len >= 1);
} else {
assert (len == 0x7f);
assert (read_in (c, &len, 4) == 4);
len = (len >> 8);
assert (len >= 1);
}
len *= 4;
int op;
assert (read_in_lookup (c, &op, 4) == 4);
c->methods->execute (c, op, len);
}
}
void try_read (struct connection *c) {
if (verbosity) {
logprintf ( "try read: fd = %d\n", c->fd);
}
if (!c->in_tail) {
c->in_head = c->in_tail = new_connection_buffer (1 << 20);
}
int x = 0;
while (1) {
int r = read (c->fd, c->in_tail->wptr, c->in_tail->end - c->in_tail->wptr);
if (r > 0 && log_net_f) {
fprintf (log_net_f, "%.02lf %d IN %s:%d", get_utime (CLOCK_REALTIME), r, c->ip, c->port);
int i;
for (i = 0; i < r; i++) {
fprintf (log_net_f, " %02x", *(unsigned char *)(c->in_tail->wptr + i));
}
fprintf (log_net_f, "\n");
fflush (log_net_f);
}
if (r > 0) {
c->last_receive_time = get_double_time ();
stop_ping_timer (c);
start_ping_timer (c);
}
if (r >= 0) {
c->in_tail->wptr += r;
x += r;
if (c->in_tail->wptr != c->in_tail->end) {
break;
}
struct connection_buffer *b = new_connection_buffer (1 << 20);
c->in_tail->next = b;
c->in_tail = b;
} else {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (verbosity) {
logprintf ("fail_connection: read_error %m\n");
}
fail_connection (c);
return;
} else {
break;
}
}
}
if (verbosity) {
logprintf ( "Received %d bytes from %d\n", x, c->fd);
}
c->in_bytes += x;
if (x) {
try_rpc_read (c);
}
}
int connections_make_poll_array (struct pollfd *fds, int max) {
int _max = max;
int i;
for (i = 0; i <= max_connection_fd; i++) {
if (Connections[i] && Connections[i]->state == conn_failed) {
restart_connection (Connections[i]);
}
if (Connections[i] && Connections[i]->state != conn_failed) {
assert (max > 0);
struct connection *c = Connections[i];
fds[0].fd = c->fd;
fds[0].events = POLLERR | POLLHUP | POLLRDHUP | POLLIN;
if (c->out_bytes || c->state == conn_connecting) {
fds[0].events |= POLLOUT;
}
fds ++;
max --;
}
}
if (verbosity >= 10) {
logprintf ( "%d connections in poll\n", _max - max);
}
return _max - max;
}
void connections_poll_result (struct pollfd *fds, int max) {
if (verbosity >= 10) {
logprintf ( "connections_poll_result: max = %d\n", max);
}
int i;
for (i = 0; i < max; i++) {
struct connection *c = Connections[fds[i].fd];
if (fds[i].revents & POLLIN) {
try_read (c);
}
if (fds[i].revents & (POLLHUP | POLLERR | POLLRDHUP)) {
if (verbosity) {
logprintf ("fail_connection: events_mask=0x%08x\n", fds[i].revents);
}
fail_connection (c);
} else if (fds[i].revents & POLLOUT) {
if (c->state == conn_connecting) {
logprintf ("connection ready\n");
c->state = conn_ready;
c->last_receive_time = get_double_time ();
}
if (c->out_bytes) {
try_write (c);
}
}
}
}
int send_all_acks (struct session *S) {
clear_packet ();
out_int (CODE_msgs_ack);
out_int (CODE_vector);
out_int (tree_count_long (S->ack_tree));
while (S->ack_tree) {
long long x = tree_get_min_long (S->ack_tree);
out_long (x);
S->ack_tree = tree_delete_long (S->ack_tree, x);
}
encrypt_send_message (S->c, packet_buffer, packet_ptr - packet_buffer, 0);
return 0;
}
void insert_msg_id (struct session *S, long long id) {
if (!S->ack_tree) {
S->ev.alarm = (void *)send_all_acks;
S->ev.self = (void *)S;
S->ev.timeout = get_double_time () + ACK_TIMEOUT;
insert_event_timer (&S->ev);
}
if (!tree_lookup_long (S->ack_tree, id)) {
S->ack_tree = tree_insert_long (S->ack_tree, id, lrand48 ());
}
}
extern struct dc *DC_list[];
struct dc *alloc_dc (int id, char *ip, int port UU) {
assert (!DC_list[id]);
struct dc *DC = talloc0 (sizeof (*DC));
DC->id = id;
DC->ip = ip;
DC->port = port;
DC_list[id] = DC;
return DC;
}
void dc_create_session (struct dc *DC) {
struct session *S = talloc0 (sizeof (*S));
assert (RAND_pseudo_bytes ((unsigned char *) &S->session_id, 8) >= 0);
S->dc = DC;
S->c = create_connection (DC->ip, DC->port, S, &auth_methods);
if (!S->c) {
logprintf ("Can not create connection to DC. Is network down?\n");
exit (1);
}
assert (!DC->sessions[0]);
DC->sessions[0] = S;
}

151
net.h
View file

@ -1,151 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
#ifndef __NET_H__
#define __NET_H__
#include <poll.h>
struct dc;
#include "queries.h"
#define TG_SERVER "173.240.5.1"
#define TG_SERVER_TEST "173.240.5.253"
#define TG_APP_HASH "36722c72256a24c1225de00eb6a1ca74"
#define TG_APP_ID 2899
#define TG_BUILD "209"
#define TG_VERSION "0.01-beta"
#define ACK_TIMEOUT 1
#define MAX_DC_ID 10
enum dc_state {
st_init,
st_reqpq_sent,
st_reqdh_sent,
st_client_dh_sent,
st_authorized,
st_error
} ;
struct connection;
struct connection_methods {
int (*ready) (struct connection *c);
int (*close) (struct connection *c);
int (*execute) (struct connection *c, int op, int len);
};
#define MAX_DC_SESSIONS 3
struct session {
struct dc *dc;
long long session_id;
int seq_no;
struct connection *c;
struct tree_long *ack_tree;
struct event_timer ev;
};
struct dc {
int id;
int port;
int flags;
char *ip;
char *user;
struct session *sessions[MAX_DC_SESSIONS];
char auth_key[256];
long long auth_key_id;
long long server_salt;
int server_time_delta;
double server_time_udelta;
int has_auth;
};
#define DC_SERIALIZED_MAGIC 0x64582faa
#define DC_SERIALIZED_MAGIC_V2 0x94032abb
#define STATE_FILE_MAGIC 0x84217a0d
#define SECRET_CHAT_FILE_MAGIC 0xa9840add
struct dc_serialized {
int magic;
int port;
char ip[64];
char user[64];
char auth_key[256];
long long auth_key_id, server_salt;
int authorized;
};
struct connection_buffer {
unsigned char *start;
unsigned char *end;
unsigned char *rptr;
unsigned char *wptr;
struct connection_buffer *next;
};
enum conn_state {
conn_none,
conn_connecting,
conn_ready,
conn_failed,
conn_stopped
};
struct connection {
int fd;
char *ip;
int port;
int flags;
enum conn_state state;
int ipv6[4];
struct connection_buffer *in_head;
struct connection_buffer *in_tail;
struct connection_buffer *out_head;
struct connection_buffer *out_tail;
int in_bytes;
int out_bytes;
int packet_num;
int out_packet_num;
int last_connect_time;
int in_fail_timer;
struct connection_methods *methods;
struct session *session;
void *extra;
struct event_timer ev;
double last_receive_time;
};
extern struct connection *Connections[];
int write_out (struct connection *c, const void *data, int len);
void flush_out (struct connection *c);
int read_in (struct connection *c, void *data, int len);
void create_all_outbound_connections (void);
struct connection *create_connection (const char *host, int port, struct session *session, struct connection_methods *methods);
int connections_make_poll_array (struct pollfd *fds, int max);
void connections_poll_result (struct pollfd *fds, int max);
void dc_create_session (struct dc *DC);
void insert_msg_id (struct session *S, long long id);
struct dc *alloc_dc (int id, char *ip, int port);
#define GET_DC(c) (c->session->dc)
#endif

View file

@ -1,105 +0,0 @@
/*
This file is part of telegram-client.
Telegram-client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Telegram-client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013
*/
// Just sample jpg file 90x90
int thumb_file_size = (82 * 6 - 2) * 4;
int thumb_file [] = {
0xe0ffd8ff, 0x464a1000, 0x01004649, 0x64000101, 0x00006400, 0xa002e2ff,
0x5f434349, 0x464f5250, 0x00454c49, 0x00000101, 0x636c9002, 0x3004736d,
0x6e6d0000, 0x47527274, 0x59582042, 0xdd07205a, 0x04000b00, 0x1b001600,
0x63612400, 0x50417073, 0x00004c50, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x0100d6f6, 0x00000000, 0x636c2dd3,
0x0000736d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x65640b00, 0x00006373, 0x00000801, 0x70633800, 0x00007472, 0x00004001,
0x74774e00, 0x00007470, 0x00009001, 0x68631400, 0x00006461, 0x0000a401,
0x58722c00, 0x00005a59, 0x0000d001, 0x58621400, 0x00005a59, 0x0000e401,
0x58671400, 0x00005a59, 0x0000f801, 0x54721400, 0x00004352, 0x00000c02,
0x54672000, 0x00004352, 0x00002c02, 0x54622000, 0x00004352, 0x00004c02,
0x68632000, 0x00006d72, 0x00006c02, 0x6c6d2400, 0x00006375, 0x00000000,
0x00000100, 0x6e650c00, 0x00005355, 0x00001c00, 0x73001c00, 0x47005200,
0x20004200, 0x75006200, 0x6c006900, 0x2d007400, 0x6e006900, 0x6c6d0000,
0x00006375, 0x00000000, 0x00000100, 0x6e650c00, 0x00005355, 0x00003200,
0x4e001c00, 0x20006f00, 0x6f006300, 0x79007000, 0x69007200, 0x68006700,
0x2c007400, 0x75002000, 0x65007300, 0x66002000, 0x65007200, 0x6c006500,
0x00007900, 0x59580000, 0x0000205a, 0x00000000, 0x0100d6f6, 0x00000000,
0x66732dd3, 0x00003233, 0x01000000, 0x00004a0c, 0xffffe305, 0x00002af3,
0x00009b07, 0xffff87fd, 0xffffa2fb, 0x0000a3fd, 0x0000d803, 0x595894c0,
0x0000205a, 0x00000000, 0x0000946f, 0x0000ee38, 0x59589003, 0x0000205a,
0x00000000, 0x00009d24, 0x0000830f, 0x5958beb6, 0x0000205a, 0x00000000,
0x0000a562, 0x000090b7, 0x6170de18, 0x00006172, 0x03000000, 0x02000000,
0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013, 0x61705b0a, 0x00006172,
0x03000000, 0x02000000, 0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013,
0x61705b0a, 0x00006172, 0x03000000, 0x02000000, 0x00006666, 0x0000a7f2,
0x0000590d, 0x0000d013, 0x68635b0a, 0x00006d72, 0x03000000, 0x00000000,
0x0000d7a3, 0x00007b54, 0x0000cd4c, 0x00009a99, 0x00006626, 0xdbff5c0f,
0x14004300, 0x0f120f0e, 0x1112140d, 0x14161712, 0x21331f18, 0x1f1c1c1f,
0x252f2d3f, 0x4e414a33, 0x4841494d, 0x765c5246, 0x6f575264, 0x66484658,
0x7a6f688c, 0x8485847d, 0x9b91634f, 0x769a808f, 0xff7f8481, 0x014300db,
0x1f171716, 0x213c1f1b, 0x547f3c21, 0x7f7f5448, 0x7f7f7f7f, 0x7f7f7f7f,
0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f,
0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x1100c0ff, 0x005a0008,
0x2201035a, 0x01110200, 0xff011103, 0x001900c4, 0x01010101, 0x00000101,
0x00000000, 0x00000000, 0x02030400, 0xc4ff0605, 0x00103600, 0x02010401,
0x06050304, 0x00000306, 0x01000000, 0x11030200, 0x05211204, 0x13514131,
0x32146122, 0x23918171, 0x72423424, 0x432515a1, 0xa2827444, 0xc4fff0b3,
0x01011400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1400c4ff,
0x00000111, 0x00000000, 0x00000000, 0x00000000, 0xdaff0000, 0x01030c00,
0x03110200, 0x003f0011, 0x404434fb, 0xbcb4875c, 0x006b38b0, 0x03dcdb12,
0xf4637f74, 0xe519f153, 0x09d7c5c7, 0x47d29160, 0x20692f18, 0xd06d786a,
0x53f7f922, 0x17b3e260, 0x2fe8668c, 0x1786a473, 0x9775efbd, 0xe917e43a,
0x1d0a1bb0, 0x114d0f82, 0x14651110, 0x35f299ed, 0xe9b09680, 0xf5a4fc2f,
0xe975bd03, 0xb506737b, 0x04444440, 0x5c444044, 0x8e8dedbd, 0xc61adc7b,
0x689c738b, 0x92a0dc01, 0x58e2b77f, 0x7bfb37d1, 0xb5b5e79d, 0xdbf968cc,
0xead3f48d, 0x38ed1313, 0xdea77c86, 0xae089963, 0xc743435a, 0x403fe4ce,
0x392ee1b9, 0xed39e718, 0xd6517e2d, 0x7fc4aa03, 0xb7ad7590, 0x77e7e6ab,
0x34bf705d, 0x7c77ca53, 0x3dea1299, 0x7fb0bcf4, 0x241fadc5, 0x95a7a816,
0x13fbe6f3, 0x3182b135, 0xd1b4b224, 0x1b0d48a2, 0xbf9d26d8, 0x82dc3640,
0x63569a2a, 0xbbd224c3, 0xb9b4714c, 0x1680aec6, 0x3d311856, 0x9b59be91,
0x09876ca6, 0x61d86564, 0x5a9f06d2, 0x36f51b0d, 0x8682e476, 0xacb1b131,
0xd1584363, 0x00456b4d, 0x22d2053b, 0x22202202, 0xf3f30222, 0xe3e513e5,
0xf1e6e1f0, 0x2380496e, 0x5fdcdb68, 0x549b3a27, 0x825e6a6c, 0x6522028b,
0xaf91ccc8, 0x341cf26b, 0x58dbc4b5, 0xf2289add, 0x0854ddbd, 0x0b9247d5,
0xf02b5c54, 0x3f917f92, 0xaf56affd, 0xe3760637, 0x05cebde0, 0xed4c76ce,
0x3cef1b63, 0x7fd8aff8, 0xa0c902ea, 0x7e730d0a, 0x435834f3, 0x26edbb76,
0xd3ec00fd, 0x76d48efa, 0xa8560f2d, 0x0e766331, 0xd319993c, 0x20243209,
0x61b7e6c8, 0x998331d0, 0x640ee802, 0x47a3d493, 0xfab99413, 0x4fd871f1,
0xe9443792, 0x627e051c, 0xd8f3051c, 0x2f28f558, 0x64b51745, 0x1b2bfee3,
0xb8783953, 0x9900fff6, 0xd8176a65, 0x5a3bf56a, 0x1b331fdb, 0x64b3572f,
0xd59a3643, 0xaf3abce1, 0x11dd20bd, 0x01111110, 0x5c141011, 0xb3e3083f,
0xd9b19cc4, 0x17edb20e, 0xa78e9aa1, 0x4ef4de06, 0x00c0bfe7, 0x7e1e442d,
0x9221fe38, 0xedb5c7dc, 0x6338078a, 0x62495b8d, 0xc11d9b8c, 0x49e81b16,
0x51d02bea, 0x3eb86d70, 0xc8bc4f13, 0xa10ec758, 0xd40751c0, 0x5ac94710,
0xc4c8b080, 0x95492b83, 0x975ee696, 0xb7bd96b4, 0x17379cce, 0x82e856e8,
0xe4c2c82a, 0x398e935f, 0x632437ea, 0x7c9c87d2, 0xdc1ddb7c, 0x65a80a48,
0x2309f164, 0x51fab475, 0x081dc11d, 0xda45573b, 0x6622f3f3, 0x48f1b214,
0x676c4edb, 0x243468c7, 0x00ffde60, 0xf1630350, 0xa0076c1d, 0x8f2c0c8b,
0x2383c26b, 0x361a8f4e, 0xaceea6c9, 0x01dd5a5d, 0x11111011, 0xc3780c04,
0xbf093ee2, 0xc7972c0b, 0x00d99040, 0xc0c20eb7, 0x659d3bd4, 0x269ab85e,
0x468e114f, 0x11ad4fdb, 0x83d083d8, 0x8c52f4bd, 0x3c9664bf, 0xa4f9c77c,
0x22a68876, 0xadb18784, 0xf480be83, 0x885a00ea, 0x220e0a88, 0xc303e4f6,
0xc866e058, 0xdddbd661, 0xdf395db1, 0xbad64343, 0xe6e65b03, 0x668e81c3,
0xad619e98, 0xeeb94563, 0xd4d19a3c, 0x3316ce95, 0x9d65f1e1, 0x3bf324fe,
0x0e468f53, 0xc386068c, 0xa89e24f7, 0xf0c7c73b, 0xb60e391f, 0x1b8827cb,
0x58601954, 0xc54f90f9, 0x80886ec5, 0x88088888, 0x1b7bb980, 0xb4c71c23,
0xe6148e39, 0xb12358b8, 0xbd08225d, 0x0ffef085, 0x72b4f025, 0x635ce389,
0xb90277e4, 0x0d05e000, 0x9bf9dbb9, 0x8e749fbc, 0x7ee6abbf, 0x4ddbf4af,
0x728df7f3, 0x10b59adf, 0xe3c38f49, 0xb23c638a, 0xdb3d9349, 0x66899a64,
0x00004dd5, 0xf51b5adf, 0x2220a255, 0xd9ff0f22};

1
po/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/*.mo

11
po/LINGUAS Normal file
View file

@ -0,0 +1,11 @@
bg
cs_CZ
de_DE
es_AR
fr
it_IT
nl
pl_PL
ru_RU
sq
uk

6
po/LINGUAS.BAD Normal file
View file

@ -0,0 +1,6 @@
# This file lists translations that are too bad or incomplete for installation.
# If you would like to improve the state of this, please see the translation page:
# https://www.transifex.com/telegram-purple-developers/telegram-purple/
da # < 55% complete
pt_BR # < 75% complete

11
po/POTFILES.in Normal file
View file

@ -0,0 +1,11 @@
# List of source files containing translatable strings.
telegram-base.c
telegram-purple.c
tgp-2prpl.c
tgp-msg.c
tgp-net.c
tgp-request.c
tgp-utils.c
tgp-chat.c

614
po/bg.po Normal file
View file

@ -0,0 +1,614 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Любомир Василев <lyubomirv@abv.bg>, 2016\n"
"Language-Team: Bulgarian (https://www.transifex.com/telegram-purple-developers/teams/53149/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Неуспешно създаване на група"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Моля, изберете поне един друг потребител:"
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Заявката беше неуспешна"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Тайният разговор е готов."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Тайният разговор беше приключен."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Съобщението е отбелязано като прочетено."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Връзка за покана: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Създаването на връзка беше неуспешно"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Само администраторите на групата могат да правят това."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Присъединихте се към разговора"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Разговорът беше добавен към списъка от стаи за разговори."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Започване на таен разговор…"
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Покана на потребители чрез връзка…"
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Изтриване и изход…"
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr "Неуспешно вписване като %s: файлът (публичният ключ) не беше открит."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Уверете се, че „telegram-purple“ е инсталирано правилно,\n"
"включително файлът „.tglpub“.\n"
"Ако използвате SELinux (наприбер при използване на „Tails“),\n"
"опитайте „make local_install“ или просто копирайте\n"
"%1$s в %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Неуспешно вписване като %s: има проблем с вътрешната библиотека „tgl“. Моля,"
" изпратете доклад за грешката, заедно с журнала."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Проблем в „tgl“"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Неуспешно вписване като %s: телефонният код не съдържа код на страната. "
"Номерата трябва да започват с пълния международен телефонен код на страната,"
" например +359 за България."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Непълен телефонен номер"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Тайният разговор вече е изтрит"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Тайният разговор не е готов"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Само създателят на канала може да публикува съобщения."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Неуспешно канене на приятел в разговора"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Посоченият потребител не съществува."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "тел. номер (+ код на страната)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Парола (двустепенно удостоверяване)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Резервно удостоверяване чрез КС\n"
"(Помага, когато не използвате „Pidgin“ и от Вас не се изисква кода)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "винаги"
#: ../telegram-purple.c:829
msgid "never"
msgstr "никога"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "питане всеки път"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Приемане на тайни разговори"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Показване на приятелите извън линия след (брой дни)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Да не се изтегля историята, по-стара от (брой дни)\n"
"(0 = неограничено)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Размер за авто. зареждане на медийни файлове (кбит)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Добавяне на всички групови разговори в списъка с приятели"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Показване на уведомления за получаване"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Изпращане на уведомления за получаване при присъствие"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Добавка за протокола „Telegram“."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s създаде разговор %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s промени заглавието на „%1$s“."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s промени снимката си."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s изтри снимка."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s добави потребителя %2$s чрез връзка."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s добави потребителя %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s изтри потребителя %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s настрои брояч за самоунищожение на %1$d секунда."
msgstr[1] "%2$s настрои брояч за самоунищожение на %1$d секунди."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s отбеляза %1$d съобщение като прочетено."
msgstr[1] "%2$s отбеляза %1$d съобщения като прочетени."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s изтри %1$d съобщение."
msgstr[1] "%2$s изтри %1$d съобщения."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s направи снимка на %1$d съобщение."
msgstr[1] "%2$s направи снимка на %1$d съобщения."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Каналът „%1$s“ беше създаден"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Канали в Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Неуспешно изпращане на съобщението."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Неуспешно изпращане на изображениео."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s изпрати стикер."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "неуспешно зареждане на съобщение"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[анимация]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[звук]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[видео]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Препратено съобщение от: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Препратено съобщение:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "неуспешно зареждане на документ или изображение"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Неуспешно свързване с главния сървър"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Неуспешно свързване със сървъра. Изтече времето за изчакване."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Връзката със сървъра беше прекъсната…"
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram иска да потвърди самоличността Ви. Моля, въведете кода за влизане, "
"който трябва да сте получили чрез КС."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Код за влизане"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Въведете кода за влизане"
#: ../tgp-request.c:54
msgid "the code"
msgstr "кодът"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "Добре"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Отказ"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Регистрация"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Собствено име"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Фамилия"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Регистриране"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Моля, регистрирайте телефонния си номер"
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Телефонният номер не е регистриран. Моля, регистрирайте телефона си чрез "
"друг клиент."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Нерегистриран"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Нужна е парола"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Въведете парола за двустепенно удостоверяване"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Добре"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Няма зададена парола за двустепенно удостоверяване. Моля, въведете я в "
"разширените настройки."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Паролата е грешна"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Приемане на тайния разговор „%s“ на това устройство?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Таен разговор"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Тайните разговори могат да се провеждат само на едно устройство. Ако "
"приемете таен разговор на това устройство, той няма да бъде достъпен никъде "
"другаде. Ако откажете, ще можете да го приемете на друго устройство."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Поканете поне още един потребител, като посочите\n"
" пълното му име (разполагате с авт. допълване).\n"
"Можете да добавите повече потребители и след началото на разговора."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Потребителско име"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Създаване на групов разговор"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Канене на потребители"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Промяна на паролата"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Текуща"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Парола"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Потвърждаване"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Нова парола"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Грешен телефонен номер"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Моля, въвеждайте само цифри във формата за международен телефонен номер: знака +, следван от кода на страната и телефонния номер.\n"
"Не използвайте други специални знаци."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Напускане на разговора"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Наистина ли искате да напуснете този разговор завинаги?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Край на тайния разговор"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Наистина ли искате да прекратите този таен разговор завинаги?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Изтриване на контакта"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr ""
"Наистина ли искате да премахнете този потребител от общия си списък с "
"контакти?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Напускане на канала"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Наистина ли искате да напуснете този канал?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "наскоро"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "последната седмица"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "последния месец"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "неизвестно"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Разговори в Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Вече сте напуснали този разговор"
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Тема:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Връзка за покана:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Ид. на разговора:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Надгрупа"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Канал"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Група"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Потребители в разговора"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Вид"

616
po/cs_CZ.po Normal file
View file

@ -0,0 +1,616 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Jiri Eischmann <jiri@eischmann.cz>, 2017\n"
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/telegram-purple-developers/teams/53149/cs_CZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs_CZ\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Nelze vytvořit skupinu"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Prosím vyberte alespoň jednoho dalšího uživatele."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Dotaz selhal"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Tajný chat připraven."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Tajný chat ukončen."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Zpráva označena jako přečtená."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Odkaz pozvánky: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Vytváření odkazu pro chat selhalo"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "K tomuto úkonu potřebujete být administrátorem skupiny."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Připojeno k chatu"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Chat přidán do seznamu chatovacích místností"
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Začít tajný chat..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Pozvat uživatele odkazem..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Smazat a ukončit..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr "Nelze se přihlásit jako %s: soubor (veřejný klíč) nenalezen."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Ověřte, jestli je telegram-purple nainstalován správně\n"
"včetně souboru .tglpub.\n"
"Pokud používáte SELinux (například při použití Tails),\n"
"zkuste 'make local_install', nebo jen nakopírujte\n"
"%1$s do %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Nelze se přihlásit jako %s: problém v použité knihovně \"tgl\". Prosím "
"nahlaste chybu včetně chybového protokolu."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problém v tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Nelze se přihlásit jako %s: telefonnímu číslu chybí předčíslí země. Čísla "
"musí začínat s plným mezinárodním předčíslím, např. +420 pro Českou "
"republiku."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Nekompletní telefonní číslo"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Tajný chat byl již smazán"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Tajný chat není připraven"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Pouze tvůrce kanálu může zasílat zprávy."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Nelze pozvat kamaráda do chatu"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Zadaný uživatel neexistuje."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "telefonní číslo (+ předčíslí země)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Heslo (dvoufaktorová autentizace)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Záložní ověřovací SMS\n"
"(Pomáhá, když nepoužíváte Pidgin a nejste vyzváni k zadání kódu)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "vždy"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nikdy"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "zeptat se"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Přijímat tajné chaty"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Zobrazit odpojené kamarády po (dny)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Nestahovat historii starší než (dny)\n"
"(0 pro neomezeně)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Velikost automaticky nahraných médií (kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Přidat všechny chatovací skupiny do seznamu kamarádů"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Zobrazit oznámení o doručení"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "V přítomnosti zasílat oznámení o doručení"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Zásuvný modul protokolu Telegram."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s vytvořil(a) chat %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s změnil(a) titulek na %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s změnil(a) fotografii."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s smazal(a) fotografii."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s přidal(a) uživatele %2$s odkazem."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s přidal(a) uživatele %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s smazal(a) uživatele %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s nastavil(a) sebedestrukční časovač na %1$d sekundu."
msgstr[1] "%2$s nastavil(a) sebedestrukční časovač na %1$d sekundy."
msgstr[2] "%2$s nastavil(a) sebedestrukční časovač na %1$d sekund."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s označil(a) %1$d zprávu jako přečtenou."
msgstr[1] "%2$s označil(a) %1$d zprávy jako přečtené."
msgstr[2] "%2$s označil(a) %1$d zpráv jako přečtené."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s smazal(a) %1$d zprávu."
msgstr[1] "%2$s smazal(a) %1$d zprávy."
msgstr[2] "%2$s smazal(a) %1$d zpráv."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s vytvořil(a) screenshot %1$d zprávy."
msgstr[1] "%2$s vytvořil(a) screenshot %1$d zpráv."
msgstr[2] "%2$s vytvořil(a) screenshot %1$d zpráv."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Kanál %1$s vytvořen"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Kanály Telegramu"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Odeslání zprávy selhalo."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Odeslání obrázku selhalo."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s odeslal nálepku."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "selhalo načítání zprávy"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animace]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Zpráva přeposlaná od:%s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Přeposlaná zpráva:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "nahrávání dokumentu nebo obrázku sehlalo"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Nelze se připojit k hlavnímu serveru"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Nelze se připojit k serveru: Vypršel časový limit pingu"
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Ztraceno spojení se serverem..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram potřebuje ověřit identitu. Prosím zadejte přihlašovací kód, který "
"jste obdrželi v SMS."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Přihlašovací kód"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Zadejte přihlašovací kód"
#: ../tgp-request.c:54
msgid "the code"
msgstr "kód"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Zrušit"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registrace"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Jméno"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Příjmení"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrovat"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Prosím zaregistrujte své telefonní číslo."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Telefonní číslo není zaregistrované. Prosím zaregistrujte své telefonní "
"číslo v jiné aplikaci."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Neregistrován"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Vyžadováno heslo"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Zadejte heslo pro dvoufaktorovou autentizaci"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Ok"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Není zadáno heslo pro dvoufaktorovou autentizaci. Prosím zadejte jej v "
"pokročilém nastavení."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Neplatné heslo"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Přijmout tajný chat '%s' na tomto zařízení?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Tajný chat"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Tajný chat může mít pouze jeden koncový bod. Pokud přijmete tajný chat na "
"tomto zařízení, zprávy nebudou dostupné nikde jinde. Pokud odmítnete, můžete"
" stále přijmout chat na jiném zařízení."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Pozvěte minimálně jednoho dalšího uživatele tím,\n"
"že zadáte jeho celé jméno (automatické doplňování dostupné).\n"
"Můžete přidat více uživatelů po té, co je chat vytvořen."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Uživatelské jméno"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Vytvořit skupinový chat"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Pozvat uživatele"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Změnit heslo"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Aktuální"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Heslo"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Potvrdit"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nové heslo"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Neplatné telefonní číslo"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Prosím zadejte pouze čísla v mezinárodním telefonním formátu, počáteční + následované mezinárodním předčíslím a telefonním číslem.\n"
"Nepoužívejte žádné jiné speciální znaky."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Opustit chat"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Chcete tento chat opustit trvale?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Ukončit tajný chat"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Chcete ukončit tento tajný chat trvale?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Smazat kontant"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "Chcete tohoto uživatele odstranit ze seznamu kontaktů?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Opustit kanál"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Chcete opustit tento kanál?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "nedávno"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "poslední týden"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "poslední měsíc"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "neznámé"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Chaty Telegramu"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Již jste tento chat opistili."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Předmět:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Odkaz pozvánky:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "ID Chatu:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Superskupina"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Kanál"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Skupina"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Uživatelé v chatu"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Typ"

588
po/da.po Normal file
View file

@ -0,0 +1,588 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: TitanusEramius <titanus@aptget.dk>, 2016\n"
"Language-Team: Danish (https://www.transifex.com/telegram-purple-developers/teams/53149/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Kunne ikke lave gruppe"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Vælg mindst én anden bruger."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Forespørgsel fejlede"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Hemmelig chat klar."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Hemmelig chat afsluttet."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Besked markeret som læst."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Invitationslink: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Oprettelse af chatlink fejlede"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr ""
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Chat tilsluttet"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Chat tilføjet listen af chatrum."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Start hemmelig chat..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Invitér brugere med link..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Slet og afslut..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problem i tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Ugyldigt telefonnummer"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Hemmelig chat er allerede slettet"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Hemmelig chat er ikke klar"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Kun den der opretter en kanal kan skrive beskeder."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Kan ikke invitere ven til chat"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Angivet bruger eksisterer ikke."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "Telefon nr. (+ landekode)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Kodeord (to-vejs godkendelse)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
#: ../telegram-purple.c:828
msgid "always"
msgstr "altid"
#: ../telegram-purple.c:829
msgid "never"
msgstr "aldrig"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "spørg"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Acceptér hemmelige chats"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Vis venner som offline efter (dage)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Hent ikke historie ældre end (dage)\n"
"(0 for ubegrænset)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr ""
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr ""
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Vis modtagelseskvittering"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr ""
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr ""
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s oprettede chat %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s ændrede titel til %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s ændrede foto."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s slettede foto."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s tilføjede bruger %2$s med link."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s tilføjede bruger %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s slettede bruger %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] ""
msgstr[1] ""
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] ""
msgstr[1] ""
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] ""
msgstr[1] ""
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] ""
msgstr[1] ""
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr ""
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr ""
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr ""
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Afsendelse af billede fejlede."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr ""
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr ""
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr ""
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr ""
#: ../tgp-msg.c:515
msgid "[video]"
msgstr ""
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr ""
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr ""
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr ""
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr ""
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr ""
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr ""
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Log ind kode"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Indtast log ind kode"
#: ../tgp-request.c:54
msgid "the code"
msgstr "koden"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Afbryd"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registrering"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Fornavn"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Efternavn"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrér"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Registrér venligst dit telefonnummer"
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
#: ../tgp-request.c:110
msgid "Not registered"
msgstr ""
#: ../tgp-request.c:122
msgid "Password needed"
msgstr ""
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Indtast kodeord til to-vejs godkendelse"
#: ../tgp-request.c:123
msgid "Ok"
msgstr ""
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Intet kodeord sat til to-vejs godkendelse. Indtast det venligst i de "
"udvidede indstillinger."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Ugyldigt kodeord"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr ""
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr ""
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Brugernavn"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Lav gruppechat"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Invitér brugere"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr ""
#: ../tgp-request.c:219
msgid "Current"
msgstr ""
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Kodeord"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr ""
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr ""
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Ugyldigt telefonnummer"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr ""
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr ""
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr ""
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr ""
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr ""
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr ""
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr ""
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr ""
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "for nyligt"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "sidste uge"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "sidste måned"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "ukendt"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr ""
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Du har allerede forladt denne chat."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Emne:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Invitationslink:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Chat ID:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr ""
#: ../tgp-chat.c:342
msgid "Channel"
msgstr ""
#: ../tgp-chat.c:345
msgid "Group"
msgstr ""
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr ""
#: ../tgp-chat.c:370
msgid "Type"
msgstr ""

617
po/de_DE.po Normal file
View file

@ -0,0 +1,617 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>, 2016\n"
"Language-Team: German (Germany) (https://www.transifex.com/telegram-purple-developers/teams/53149/de_DE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Konnte Gruppe nicht erstellen."
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Wählen Sie mindestens einen weiteren Benutzer."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Anfrage fehlgeschlagen"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Geheimer Chat ist bereit."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Geheimer Chat wurde beendet."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Nachricht als gelesen markiert."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Einladungslink: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Konnte keinen Link zum Chat erstellen"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Sie müssen Gruppenadmin sein, um das zu tun."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Chat beigetreten"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Chat der Liste von Chat-Räumen hinzugefügt."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Beginne geheimen Chat ..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Nutzer per Link einladen ..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Löschen und verlassen ..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
"Konnte nicht als %s einloggen: Datei (öffentlichen Schlüssel) nicht gefunden"
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Stellen Sie eine korrekte Installation sicher,\n"
"inklusive der .tglpub-Datei.\n"
"Falls Sie SELinux benutzen (z.B. innerhalb von Tails),\n"
"versuchen Sie 'make local_install', oder kopieren Sie einfach\n"
"%1$s nach %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Konnte nicht als %s einloggen: Problem in der Bibliothek 'tgl'. Bitte "
"erstelle einen Bigreport mit Debug-Log."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problem in tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Konnte nicht als %s einloggen: Telefonnummer hat kein Präfix. Telefonnummern"
" müssen mit dem vollen internationalen Präfix-Code starten, z.B. +49 für "
"Deutschland."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Unvollständige Telefonnummer"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Geheimer Chat wurde bereits gelöscht."
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Geheimer Chat ist noch nicht bereit."
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Nur der Ersteller eines Kanals kann Nachrichten senden."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Kann den Freund nicht zum Chat einladen"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Angegebener Benutzer existiert nicht."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "Telefonnummer (+ Länder-Präfix)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Passwort (Zwei-Faktor-Authentifizierung)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Ausweich SMS-Verifizierung\n"
"(Hilfreich wenn Sie nicht Pidgin verwenden, und die Frage\n"
"nach dem SMS-Code aus bleibt)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "immer"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nie"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "nachfragen"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Geheime Chats akzeptieren"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Freunde als offline anzeigen nach (Tage)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Abrufen des Verlaufs begrenzen auf (Tage)\n"
"(0 für unbegrenzt)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Lade automatisch ab Größe (KB)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Alle Gruppenchats in die Freundesliste einfügen"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Empfangsbestätigungen anzeigen"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Empfangsbestätigungen senden wenn anwesend"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Plugin für das Telegram Protokoll."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s hat den Chat %1$s erstellt."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s hat den Titel zu %1$s geändert."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s hat das Photo geändert."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s hat das Photo gelöscht."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s fügte Benutzer %2$s per Link hinzu."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s hat den Nutzer %1$s hinzufügt."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s entfernte Benutzer %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s setzte Selbstzerstörungs-Timer auf %1$d Sekunde."
msgstr[1] "%2$s setzte Selbstzerstörungs-Timer auf %1$d Sekunden."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s markierte %1$d Nachricht als gelesen."
msgstr[1] "%2$s markierte %1$d Nachrichten als gelesen."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s entfernte %1$d Nachricht."
msgstr[1] "%2$s entfernte %1$d Nachrichten."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s machte einen Screenshot von %1$d Nachricht."
msgstr[1] "%2$s machte einen Screenshot von %1$d Nachrichten."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Kanal %1$s erstellt"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Telegram Kanäle"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Absenden der Nachricht fehlgeschlagen."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Absenden des Bilds fehlgeschlagen."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s hat einen Sticker gesendet."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "konnte Nachricht nicht laden."
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[Animation]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[Audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[Video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Weitergeleitet von: %s</b> %s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Weitergeleitete Nachricht:</b> %s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "konnte Dokument oder Datei nicht laden"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Keine Verbindung zum Haupt-Server"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Keine Verbindung zum Server: Zeitüberschreitung"
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Verbindung zum Server verloren ..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram möchte Ihre Identität prüfen. Bitte geben Sie den Login-Code ein, "
"den Sie per SMS erhalten haben."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Login-Code"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Login-Code eingeben"
#: ../tgp-request.c:54
msgid "the code"
msgstr "der Login-Code"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "Ok"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Abbrechen"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Anmeldung"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Vorname"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Nachname"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Anmelden"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Bitte registriere deine Telefonnummer."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Telefonnummer wurde noch nicht bei Telegram registriert. Bitte registrieren "
"Sie Ihre Telefonnummer mit einem anderen Client."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Nicht registriert"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Passwort benötigt"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Passwort für die Zwei-Faktor-Authentifizierung angeben"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Ok"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Kein Passwort für die Zwei-Faktor-Authentifizierung gesetzt, bitte\n"
"spezifizieren Sie dies in den erweiterten Einstellungen."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Passwort ungültig"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Geheimen Chat '%s' auf diesem Gerät akzeptieren?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Geheimer Chat"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Geheime Chats können nur einen Endpunkt haben. Wenn du den geheimen Chat auf"
" diesem Geräte akzeptierst werden die Nachrichten nirgendwo anders verfügbar"
" sein. Wenn du ablehnst kannst du den Chat immernoch auf anderen Geräten "
"akzeptieren."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Lade noch mindestens einen zusätzlichen Benutzer\n"
"durch Eingabe des vollständigen Namens ein\n"
"(Autovervollständigung verfügbar).\n"
"Sie können später weitere Nutzer einladen, sobald\n"
"der Chat erstellt wurde."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Benutzername"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Gruppenchat erstellen"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Benutzer einladen"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Passwort ändern"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Momentan"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Passwort"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Bestätigen"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Neues Passwort"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Ungültige Telefonnummer"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Bitte geben Sie Telefonnummern im internationalen Format ein, bestehend aus einem führenden + gefolgt vom Länderpräfix\n"
"und der Rufnummer. Verwenden Sie keine anderen Sonderzeichen."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Chat verlassen"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Möchten Sie diesen Chat dauerhaft verlassen?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Geheimen Chat abbrechen"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Möchten Sie diesen geheimen Chat dauerhaft verlassen?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Kontakt löschen"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "Möchten Sie diesen Kontakt global löschen?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Kanal verlassen"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Möchten Sie diesen Kanal dauerhaft verlassen?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "Kürzlich"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "Letzte Woche"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "Letzten Monat"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "Unbekannt"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Telegram Unterhaltugen"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Du hast diesen Chat bereits verlassen."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Thema:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Einladungslink:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Chat ID:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Über-Gruppe"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Kanal"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Gruppe"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Benutzer im Chat"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Typ"

615
po/es.po Normal file
View file

@ -0,0 +1,615 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: aguador <aguador@openmailbox.org>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/telegram-purple-developers/teams/53149/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "No se pudo crear el grupo"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Por favor, seleccioná al menos otro usuario."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Falló la consulta"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Conversación secreta lista."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Finalizó la conversación secreta."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Mensaje marcado como leído."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Enlace de invitación: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Falló la creación del enlace de converesación"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Necesite ser administrador del grupo para hacer eso."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Unido a la conversación"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Conversación agregada a la lista de salas de conversaciones."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Iniciar conversación secreta..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Invitar a usuarios por enlace..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Eliminar y salir..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
"No se pudo iniciar sesión como %s: no se encontró el archivo (clave "
"pública)."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Asegurarse de que telegram-purple está instalado apropiadamente,\n"
"incluyendo el archivo .tglpub.\n"
"Si esta ejecutando SELinux (por ejemplo, al usar Tails),\n"
"intente probar 'make local_install', o simplemente copie\n"
"%1$s a %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"No se pudo iniciar sesión como %s: problema con la biblioteca 'tgl'. Por "
"favor, envíe un informe de error con el registro de depuración."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problema en tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"No se pudo iniciar sesión como %s: al número de teléfono le falta el prefijo"
" del país. Los números deben comenzar con el código de prefijo "
"internacional, por ejemplo: +34 para España."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Número de teléfono incompleto"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Ya se eliminó la conversación secreta"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "La conversación secreta no está lista"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Sólo el creador de un canal puede publicar mensajes."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "No se pudo invitar al contacto a la conversación"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "El usuario especificado no existe."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "Núm. tlf. (+ prefijo país)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Contraseña (autenticación de dos pasos)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Verificación por mensaje de texto\n"
"(Sirve para cuando no está usando Pidgin y no se le pido el código)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "siempre"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nunca"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "pedir"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Aceptar conversaciones secretas"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Mostrar contactos desconectados después de (días)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"No recuperar el historial anterior a (días)\n"
"(introducir '0' para no aplicar límites)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Tamaño del medio de carga automático (kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Agregar todas las conversaciones grupales a la lista del contacto"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Mostrar acuses de recibo"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Enviar acuses de recibo al estar presente"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Plugin de protocolo de Telegram."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s creó la conversación %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s cambió el título a %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s cambió la foto."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s eliminó la foto."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s agregó al usuario %2$s mediante un enlace."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s agregó al usuario %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s eliminó al usuario %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s estableció un temporizador autodestructivo a %1$d segundo."
msgstr[1] "%2$s estableció un temporizador autodestructivo a %1$d segundos."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s marcó %1$d mensaje como leído."
msgstr[1] "%2$s marcó %1$d mensajes como leídos."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s eliminó %1$d mensaje."
msgstr[1] "%2$s eliminó %1$d mensajes."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s tomó una captura de pantalla de %1$d mensaje."
msgstr[1] "%2$s tomó una captura de pantalla de %1$d mensajes."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Canal %1$s creado"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Canales de Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Falló el envío de mensajes."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Falló el envío de imágenes."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s envió un sticker."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "falló la carga del mensaje"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animación]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[vídeo]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Mensaje reenviado de: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Mensaje reenviado:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "falló la carga del documento o imagen"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "No se puede conectar al servidor principal"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "No se puede conectar al servidor: tiempo de espera agotado."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Se perdió la conexión con el servidor..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram quiere verificar su identidad. Por favor, introduce el código que "
"recibió en un mensaje de texto."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Código de inicio de sesión"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Intoducir código de inicio de sesión"
#: ../tgp-request.c:54
msgid "the code"
msgstr "el código"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "Aceptar"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Cancelar"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registro"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Nombre"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Apellido"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrar"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Por favor, registre su número de teléfono."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"No se registró el número de teléfono. Por favor, registre su teléfono en un "
"cliente diferente."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "No registrado"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Se necesita la contraseña"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Introducir contraseña para la autenticación de dos pasos"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Aceptar"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"No se estableció contraseña para la autenticación de dos pasos. Por favor, "
"introdúcela en la configuración extendida."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Contraseña no válida"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "¿Acepte la conversación secreta '%s' en este dispositivo?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Conversación secreta"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Las conversaciones secretas son uno a uno. Si acepte una conversación "
"secreta en este dispositivo, la misma no estará disponible en ningún otro "
"lado. Si decline, pueda aceptar la conversación en otro dispositivo."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Invite al menos a un usuario más especificando\n"
"su nombre completo (disponible autocompletado).\n"
"Pueda agregar más usuarios una vez que se cree la conversación."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nombre de usuario"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Crear conversación grupal"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Invitar a los usuarios"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Cambiar contraseña"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Actual"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Contraseña"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Confirmar"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nueva contraseña"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Número de teléfono no válido"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Por favor, introduce sólo números en el formato de números de teléfono internacional, con el signo '+' seguido del código de país [más prefijo para el acceso a la red celular, si corresponde] y el número de teléfono.\n"
"No use ningún otro carácter."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Abandonar conversación"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "¿Querés abandonar esta conversación permanentemente?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Cancelar conversación secreta"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr ""
"¿Esté seguro que quiere eliminar esta conversación secreta permanentemente?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Eliminar contacto"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "¿Quiere quitar este usuario de su lista global de contactos?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Abandonar canal"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "¿Quiere abandonar este canal?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y - %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "recientemente"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "la semana pasada"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "el mes pasado"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "desconocido"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Conversaciones de Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Ya ha abandonado esta conversación."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Asunto:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Enlace de invitación:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Identificación de conversación:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Súpergrupo"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Canal"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Grupo"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Usuarios en la conversación"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Tipo"

616
po/es_AR.po Normal file
View file

@ -0,0 +1,616 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: KNTRO <kntro@msn.com>, 2016\n"
"Language-Team: Spanish (Argentina) (https://www.transifex.com/telegram-purple-developers/teams/53149/es_AR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es_AR\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "No se pudo crear el grupo"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Por favor, seleccioná al menos otro usuario."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Falló la consulta"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Conversación secreta lista."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Finalizó la conversación secreta."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Mensaje marcado como leído."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Enlace de invitación: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Falló la creación del enlace de conversación"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Necesitás ser administrador del grupo para hacer eso."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Unido a la conversación"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Conversación agregada a la lista de salas de conversaciones."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Iniciar conversación secreta..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Invitar a usuarios por enlace..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Eliminar y salir..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
"No se pudo iniciar sesión como %s: no se encontró el archivo (clave "
"pública)."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Asegurate de que telegram-purple está instalado apropiadamente,\n"
"incluyendo el archivo .tglpub.\n"
"Si estás ejecutando SELinux (por ejemplo, al usar Tails),\n"
"intentá probar \"make local:_install\", o simplemente copiá\n"
"%1$s a %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"No se pudo iniciar sesión como %s: hay un problema con la biblioteca "
"\"tgl\". Por favor, enviá un informe de errores con el registro de "
"depuración."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problema en tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"No se pudo iniciar sesión como %s: al número de teléfono le falta el prefijo"
" del país. Los números deben comenzar con el código de prefijo "
"internacional, por ejemplo: +54 para Argentina."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Número de teléfono incompleto"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Ya se eliminó la conversación secreta"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "La conversación secreta no está lista"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Sólo el creador de un canal puede publicar mensajes."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "No se pudo invitar al contacto a la conversación"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "El usuario especificado no existe."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "Número de teléfono (+ prefijo de país)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Contraseña (autenticación de 2 pasos)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Verificación por mensaje de texto\n"
"(Sirve para cuando no estás usando Pidgin y no se te pide el código)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "siempre"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nunca"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "preguntar"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Aceptar conversaciones secretas"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Mostrar contactos desconectados después de (días)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"No recuperar el historial anterior a (días)\n"
"(ingresá \"0\" para no aplicar límites)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Tamaño de medio de descarga automática (kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Agregar todas las conversaciones grupales a la lista del contacto"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Mostrar acuses de recibo"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Enviar acuses de recibo al estar presente"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Plugin de protocolo de Telegram."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s creó la conversación %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s cambió el título a %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s cambió la foto."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s eliminó la foto."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s agregó al usuario %2$s mediante un enlace."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s agregó al usuario %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s eliminó al usuario %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s estableció un contador autodestructivo a %1$d segundo."
msgstr[1] "%2$s estableció un contador autodestructivo a %1$d segundos."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s marcó %1$d mensaje como leído."
msgstr[1] "%2$s marcó %1$d mensajes como leídos."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s eliminó %1$d mensaje."
msgstr[1] "%2$s eliminó %1$d mensajes."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s tomó una captura de pantalla de %1$d mensaje."
msgstr[1] "%2$s tomó una captura de pantalla de %1$d mensajes."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Canal %1$s creado"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Canales de Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Falló el envío de mensajes."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Falló el envío de imágenes."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s envió un sticker."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "falló la carga del mensaje"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animación]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Mensaje reenviado de: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Mensaje reenviado:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "falló la carga del documento o imagen"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "No se puede conectar al servidor principal"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "No se puede conectar al servidor: tiempo de respuesta agotado."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Se perdió la conexión con el servidor..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram quiere verificar tu identidad. Por favor, ingresá el código que "
"recibiste en un mensaje de texto."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Código de inicio de sesión"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Ingresar código de inicio de sesión"
#: ../tgp-request.c:54
msgid "the code"
msgstr "el código"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "Aceptar"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Cancelar"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registro"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Nombre"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Apellido"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrar"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Por favor, registrá tu número de teléfono."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"No se registró el número de teléfono. Por favor, registrá tu teléfono en un "
"cliente diferente."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "No registrado"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Se necesita la contraseña"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Ingresar contraseña para la autenticación de 2 pasos"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Aceptar"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"No se estableció contraseña para la autenticación de 2 pasos. Por favor, "
"ingresala en la configuración extendida."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Contraseña no válida"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "¿Aceptás la conversación secreta \"%s\" en este dispositivo?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Conversación secreta"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Las conversaciones secretas son uno a uno. Si aceptás una conversación "
"secreta en este dispositivo, la misma no estará disponible en ningún otro "
"lado. Si declinás, podés aceptar la conversación en otro dispositivo."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Invitá al menos a un usuario más especificando\n"
"su nombre completo (disponible autocompletado).\n"
"Podés agregar más usuarios una vez que se cree la conversación."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nombre de usuario"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Crear conversación grupal"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Invitar a usuarios"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Cambiar contraseña"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Actual"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Contraseña"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Confirmar"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nueva contraseña"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Número de teléfono no válido"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Por favor, ingresá sólo números en el formato de números de teléfono internacional, con el signo \"+\" seguido del código de país [más prefijo para el acceso a la red celular, si corresponde] y el número de teléfono.\n"
"No usés ningún otro caracter."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Abandonar conversación"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "¿Querés abandonar esta conversación permanentemente?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Cancelar conversación secreta"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr ""
"¿Estás seguro que querés eliminar esta conversación secreta permanentemente?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Eliminar contacto"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "¿Querés quitar este usuario de tu lista global de contactos?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Abandonar canal"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "¿Querés abandonar este canal?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%Y.%m.%d - %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "recientemente"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "la semana pasada"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "el mes pasado"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "[desconocido]"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Conversaciones de Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Ya abandonaste esta conversación."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Asunto:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Enlace de invitación:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Identificación de conversación:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Súpergrupo"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Canal"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Grupo"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Usuarios en la conversación"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Tipo"

615
po/fr.po Normal file
View file

@ -0,0 +1,615 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: kekh <tukhnet@gmail.com>, 2016\n"
"Language-Team: French (https://www.transifex.com/telegram-purple-developers/teams/53149/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "N'a pas pu créer le groupe"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Veuillez sélectionner au moins un autre utilisateur."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Requête échouée"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Conversation secrète prête."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Conversation secrète terminée."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Message marqué comme lu."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Lien d'invitation : %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Création du lien d'invitation échouée"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Vous devez être administrateur du groupe pour faire cela."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Conversation atteinte."
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Conversation ajoutée dans la liste des conversations."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Commencer une conversation secrète..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Inviter des utilisateurs avec un lien..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Supprimer et quitter..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
"Impossible de se connecter comme %s : fichier de clé publique manquant."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Soyez sûr que telegram-purple est installé proprement,\n"
"particulièrement le fichier .tglpub.\n"
"Si vous avez SELinux (ex: En utilisant Tails),\n"
"essayez 'make local_install', ou copiez simplement\n"
"%1$s dans %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Impossible de s'identifier comme %s : Problème avec la librairie sous-"
"jacente 'tgl'. Veuillez svp soumettre un rapport de bug incluant des "
"informations de débug."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problème relatif à Tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Impossible de se connecter avec %s : le préfixe de pays est manquant. Le "
"numéro de téléphone doit commencer avec le numéro de préfixe international, "
"ex: +33 pour la France."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Numéro de téléphone incomplet"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Conversation secrète déjà supprimée."
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Conversation secrète non prête"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Seul le créateur du canal peut publier des messages"
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Impossible d'ajouter le contact à la conversation"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "L'utilisateur spécifié n'existe pas."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "n° téléphone (+ préfixe pays)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Mot de passe (authentification à deux facteurs)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Vérification par SMS\n"
"(Cela aide si vous nutilisez pas Pidgin et que vous n'êtes pas notifié pour le code)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "toujours"
#: ../telegram-purple.c:829
msgid "never"
msgstr "jamais"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "demander"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Accepter la conversation secrète"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Afficher les contacts déconnectés après (jours)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Ne pas récupérer l'historique plus vieux que (jours)\n"
"(0 pour infinie)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Taille max. chargement auto. des médias (Kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Ajouter tous les membres de la conversation dans la liste de contact"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Afficher les notifications de réception"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Envoyer des notifications de réception quand vous êtes présent."
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Extension Protocole Telegram"
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s a créé la conversation %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s a changé le titre pour %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s a changé sa photo."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s a supprimé la photo."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s a ajouté l'utilisateur %2$s avec un lien."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s a ajouté l'utilisateur %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s a supprimé l'utilisateur %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s a mis le compte a rebours d'auto destruction à %1$d secondes."
msgstr[1] "%2$s a mis le compte à rebours d'auto destruction à %1$d secondes."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s a marqué les messages de %1$d lu."
msgstr[1] "%2$s a marqué les messages de %1$d lus."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s a supprimé les messages de %1$d."
msgstr[1] "%2$s a supprimé les messages de %1$d."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s a pris un copie d'écran des messages de %1$d."
msgstr[1] "%2$s a pris une copie d'écran des messages de %1$d."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Canal %1$s créé"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Canaux Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "L'envoi du message a échoué."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "L'envoi de l'image a échoué."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s a envoyé un sticker."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "échec au chargement du message"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animation]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Message transféré depuis : %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Message transféré :</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "échec au chargement du document ou de l'image"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Impossible de se connecter au serveur principal"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Impossible de se connecter avec le serveur : Délai d'attente dépassé."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Connexion au serveur perdue..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram veut vérifier votre identité, Entrez le code que vous avez reçu par"
" SMS."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Code de connexion"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Entrez le code de connexion"
#: ../tgp-request.c:54
msgid "the code"
msgstr "le code"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Annuler"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Enregistrement"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Prénom"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Nom de famille"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Enregistrer"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Enregistrez votre numéro de téléphone."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Numéro de téléphone non enregistré. Enregistrez un numéro de téléphone sur "
"un appareil différent."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Non enregistré"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Besoin du mot de passe"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Entrez le mot de passe pour l'authentification à deux facteurs"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Ok"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Pas de mot de passe à deux facteurs spécifié. Entrez-en un dans la "
"configuration étendue."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Mot de passe invalide"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Accepter la conversation secrète %s sur cet appareil ?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Conversation secrète"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Les conversations secrètes ne peuvent être vues que sur un seul appareil. Si"
" vous acceptez la conversation secrète sur cet appareil, elle ne sera pas "
"disponible ailleurs. Si vous refusez, vous pourrez toujours accepter cette "
"conversation sur un autre appareil."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Invitez au moins un autre utilisateur (auto-complétion disponible).\n"
"Vous pouvez ajouter plus d'utilisateurs une fois la conversation créée."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nom d'utilisateur"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Créer une conversation de groupe"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Inviter des utilisateurs"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Changer le mot de passe"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Courrant"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Mot de passe"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Confirmer"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nouveau mot de passe"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Numéro de téléphone invalide"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Entrez seulement des numéros dans le champs pour le numéro international, un + suivi du préfixe de pays et du numéro de téléphone.\n"
"N'utilisez aucun autre caractère spécial."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Quitter la conversation"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Voulez-vous quitter cette discussion définitivement ?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Abandonner la conversation secrète"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Voulez-vous clore cette conversation définitivement ?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Supprimer ce contact"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr ""
"Voulez-vous supprimer cet utilisateur de votre liste de contacts globale ?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Quitter le canal"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Voulez-vous quitter ce canal ?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "récemment"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "semaine précédente"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "mois précédent"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "inconnue"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Conversations de Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Vous avez déjà quitté cette conversation."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Sujet :"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Lien d'invitation :"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Chat ID :"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Supergroup"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Canal"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Groupe"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Utilisateurs dans la conversation"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Type"

613
po/it_IT.po Normal file
View file

@ -0,0 +1,613 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Giuseppe Pignataro (Fasbyte01) <rogepix@gmail.com>, 2017\n"
"Language-Team: Italian (Italy) (https://www.transifex.com/telegram-purple-developers/teams/53149/it_IT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Impossibile creare un gruppo"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Seleziona almeno un altro utente"
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Richiesta fallita"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Chat segreta pronta."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Chat segreta terminata."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Messaggio contrassegnato come letto."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Link d'invito: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Creazione del link della chat fallito"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Devi essere admin del gruppo per eseguire questa operazione."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Entrato nella chat"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Chat aggiunta alla lista delle chat rooms"
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Inizia chat segreta..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Invita utenti tramite link..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Elimina ed esci..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr "Impossibile accedere come %s: file (chiave pubblica) non trovato."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Assicurati che telegram-purple sia installato correttamente,\n"
"includendo il file .tglpub.\n"
"Se hai avviato SELinux (p.e. quando si usa Tails),\n"
"prova 'make local_install', o semplicemente copia\n"
"%1$s a %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Impossibile entrare come %s: problema con la libreria 'tgl'. Invia un bug "
"report con il log di debug."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problema in tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Impossibile accedere come %s: il numero telefonico manca del prefisso "
"internazionale.I numeri devono iniziare con il prefisso internazionale "
"completo, p.e. +39 per Italia."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Numero di telefono incompleto"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "La chat segreta è già stata eliminata"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "La chat segreta non è pronta"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Solo il creatore di un canale può postare messaggi."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Impossibile invitare il contatto alla chat."
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "L'utente specificato non esiste."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "num. telefono ( + prefisso internazionale)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Password (autenticazione a due fattori)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Verifica via SMS di scorta.\n"
"(Aiuta quando non si usa Pidgin e non viene richiesto il codice)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "sempre"
#: ../telegram-purple.c:829
msgid "never"
msgstr "mai"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "chiedi"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Accetta chat segrete"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Mostra utenti offline dopo (giorni)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Non recuperare la cronologia meno recente che (giorni)\n"
"(0 per illimitato)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Grandezza media autocaricato (kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Aggiungi tutte le chat di gruppo alla lista contatti"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Mostra notifiche di ricezione"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Invia notifiche di ricezione quando presente"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Plugin di protocollo Telegram"
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s ha creato la chat %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s ha cambiato titolo a %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s ha cambiato la foto."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s ha cancellato la foto."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s ha aggiunto l'utente %2$s tramite link."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s ha aggiunto l'utente %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s ha eliminato l'utente %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s ha impostato il timer di autodistruzione a %1$d secondi."
msgstr[1] "%2$s ha impostato il timer di autodistruzione a %1$d secondi."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s ha contrassegnato come letti i messaggi %1$d "
msgstr[1] "%2$s ha contrassegnato come letti i messaggi %1$d "
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s ha cancellato %1$d messaggi."
msgstr[1] "%2$s ha cancellato %1$d messaggi."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s ha creato una immagine dello schermo dei messaggi %1$d."
msgstr[1] "%2$s ha creato una immagine dello schermo dei messaggi %1$d."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Canale %1$s creato"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Canali Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Invio immagine fallito."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Invio immagine fallito."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s ha inviato uno sticker."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "caricamento del messaggio fallito"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animazione]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Messaggio inoltrato da: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Messaggio inoltrato:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "caricamento del documento o della foto fallito"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Impossibile connettersi col server"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Impossibile connettersi al server: Ping timeout."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Connessione al server fallita..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram vuole verificare la tua identità, Prego inserisci il codice "
"ricevuto via SMS."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Codice di accesso (login)"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Inserire codice d'accesso (login)"
#: ../tgp-request.c:54
msgid "the code"
msgstr "il codice"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Annulla"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registrazione"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Nome"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Cognome"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrati"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Per favore registra il tuo numero di telefono."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Numero telefonico non registrato. Per favore registra il tuo numero "
"telefonico con un client differente."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Non registrato"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Password necessaria"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Inserire password per autenticazione a due fattori"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Ok"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Nessuna password impostata per l'autenticazione a due fattori.Prego "
"impostarla nelle impostazioni estese"
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Password non valida"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Accetti la Chat Segreta '%s'?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Chat Segreta"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Le Chat Segrete possono avere un solo punto terminale. Se accetti la chat "
"segreta su questo dispositivo, i messaggi dentro di essa non saranno "
"disponibili da nessun altra parte. Se declini, potrai accettare la chat su "
"altri dispositivi."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Invita almeno un altro utente specificando\n"
" il suo nome completo (autocompletamento disponibile).\n"
"Puoi aggiungere più utenti una volta che la chat è stata creata."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nome utente"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Crea chat di gruppo"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Invita utenti"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Cambia password"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Corrente"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Password"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Conferma"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nuova password"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Numero di telefono non valido"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Inserire solo numeri nel formato telefonico internazionale, un + iniziale, seguito dal prefisso internazionale e al numero telefonico completo. \n"
"Non usare altri caratteri speciali."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Lascia chat"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Vuoi lasciare questa chat in modo permanente?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Annulla Chat Segreta"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Vuoi terminare questa chat segreta in modo permanente?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Elimina contatto"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "Vuoi rimuovere questo utente dal tuo elenco dei contatti globale?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Lascia il canale"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Vuoi lasciare questo canale?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "recentemente"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "ultima settimana"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "ultimo mese"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "sconosciuto"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Chat di Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Hai già lasciato questa chat."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Oggetto:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Link d'invito:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "ID chat:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Supergruppo"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Canale"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Gruppo"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Utenti in chat."
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Tipo"

613
po/nl.po Normal file
View file

@ -0,0 +1,613 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: justin [notsupplied] <inactive+justin50@transifex.com>, 2016\n"
"Language-Team: Dutch (https://www.transifex.com/telegram-purple-developers/teams/53149/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Kon groep niet aanmaken"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Selecteer minimaal één andere gebruiker."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Zoekopdracht mislukt"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Geheime chat gereed."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Geheime chat beëindigd."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Bericht gemarkeerd als gelezen."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Uitnodigingkoppeling: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Chatkoppeling aanmaken mislukt"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "U moet administrator van de groep zijn om dat te kunnen doen."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Bij chat binnengekomen"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Chat toegevoegd aan de chatruimtelijst."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Geheime chat starten..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Gebruikers met koppeling uitnodigen..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Verwijderen en afsluiten..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr "Kan niet aanmelden als %s: (publieke sleutel) niet gevonden."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Zorg ervoor dat telegram-purple juist is \n"
"geïnstalleerd, alsmede het .tglpub-bestand.\n"
"Als u SELinux uitvoert (bijv. bij gebruik van Tails),\n"
"probeer make local_install, of kopieer simpelweg\n"
"%1$s naar %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Kon niet aanmelden als %s: probleem in de onderliggende bibliotheek tgl. "
"Verstuur alstublieft een foutenrapport met het debuglogboek."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Probleem in tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Kon niet aanmelden als %s: landnummer ontbreekt in telefoonnummer. Nummers "
"moeten starten met het volledige internationale landnummer, bijvoorbeeld +31"
" voor Nederland."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Onvolledig telefoonnummer"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Geheime chat was al verwijderd"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Geheime chat is niet gereed"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Alleen de maker van een kanaal kan berichten plaatsen."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Kan vriend niet uitnodigen om te chatten"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Opgegeven gebruiker bestaat niet."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "telefoonnummer (+ landnummer)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Wachtwoord (authentificatie in twee stappen)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"SMS-verificatie om op terug te vallen\n"
"(Helpt wanneer u Pidgin niet gebruikt en niet wordt gevraagd om de code)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "altijd"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nooit"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "vragen"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Geheime chats accepteren"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Vrienden offline weergeven na (dagen)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Geschiedenis niet ophalen voor ouder\n"
"dan (dagen) (0 voor oneindig)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Mediagrootte automatisch laden (kb)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Alle groepschats aan de vriendenlijst toevoegen"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Ontvangstmeldingen tonen"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Ontvangstmeldingen versturen indien aanwezig"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Telegram-protocol-plug-in."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s heeft geheime chat %1$s aangemaakt."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s heeft titel naar %1$s gewijzigd."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s heeft foto gewijzigd."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s heeft foto verwijderd."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s heeft gebruiker %2$s toegevoegd met koppeling."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s heeft gebruiker %1$s toegevoegd."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s heeft gebruiker %1$s verwijderd."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s heeft zelfvernietigingstimer ingesteld op %1$d seconde."
msgstr[1] "%2$s heeft zelfvernietigingstimer ingesteld op %1$d seconden."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s heeft %1$d bericht als gelezen gemarkeerd."
msgstr[1] "%2$s heeft %1$d berichten als gelezen gemarkeerd."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s heeft %1$d bericht verwijderd."
msgstr[1] "%2$s heeft %1$d berichten verwijderd."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s heeft een schermafdruk gemaakt van %1$d bericht."
msgstr[1] "%2$s heeft een schermafdruk gemaakt van %1$d berichten."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Kanaal %1$s aangemaakt"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Telegram-kanalen"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Bericht versturen mislukt."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Afbeelding versturen mislukt."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s heeft een sticker verzonden."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "bericht laden mislukt"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animatie]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[audio]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[video]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Doorgestuurd bericht van: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Doorgestuurd bericht:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "document of foto laden mislukt"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Kan niet verbinden met hoofdserver"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Kan niet verbinden met server: ping-timeout"
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Verbinding met de server verloren..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram wil uw identiteit graag controleren. Voer de inlogcode in die u per"
" SMS heeft ontvangen."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Inlogcode"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Inlogcode invoeren"
#: ../tgp-request.c:54
msgid "the code"
msgstr "de code"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "Ok"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Annuleren"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registratie"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Voornaam"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Achternaam"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registreren"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Registreer uw telefoonnummer."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Uw telefoonnummer is niet geregistreerd. Registreer uw telefoon op een ander"
" apparaat."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Niet geregistreerd"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Wachtwoord benodigd"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Wachtwoord invoeren voor authentificatie in twee stappen"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "Ok"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Geen wachtwoord ingesteld voor authentificatie in twee stappen. Voer deze in"
" bij de uitgebreide instellingen."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Wachtwoord ongeldig"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Geheime chat %s op dit apparaat accepteren?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Geheime chat"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Geheime chat kunnen slechts één afleverpunt bevatten. Als u een geheime chat"
" op dit apparaat accepteert kunt u deze berichten nergens anders bekijken. "
"Als u weigert kunt u de chat nog steeds op andere apparaten accepteren."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Nodig minimaal één andere gebruiker uit door\n"
" volledige namen op te geven (automatisch \n"
"aanvullen is beschikbaar). U kunt meer gebruikers\n"
"toevoegen als de chat aangemaakt is."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Gebruikersnaam"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Groepschat aanmaken"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Gebruikers uitnodigen"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Wachtwoord wijzigen"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Huidig"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Wachtwoord"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Bevestigen"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nieuw wachtwoord"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Onvolledig telefoonnummer"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Voer alleen cijfers in in het internationale telefoonnummerformaat, dus om te beginnen een + gevolgd door het landnummer en het telefoonnummer.\n"
"Gebruik geen andere speciale tekens."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Chat verlaten"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Wilt u deze chat permanent verlaten?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Geheime chat beëindigen"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Wilt u deze geheime chat permanent beëindigen?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Contact verwijderen"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "Wil u deze gebruiker uit uw algemene contactenlijst verwijderen?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Kanaal verlaten"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Wilt u dit kanaal verlaten?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d-%m-%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "recent"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "afgelopen week"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "afgelopen maand"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "onbekend"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Telegram-chats"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "U heeft dit kanaal al verlaten."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Onderwerp:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Uitnodigingskoppeling:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Chat-ID:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Supergroep"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Kanaal"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Groep"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Gebruikers in chat"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Soort"

623
po/pl_PL.po Normal file
View file

@ -0,0 +1,623 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>, 2016\n"
"Language-Team: Polish (Poland) (https://www.transifex.com/telegram-purple-developers/teams/53149/pl_PL/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl_PL\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Nie można utworzyć grupy"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Należy wybrać co najmniej jednego użytkownika."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Zapytanie się nie powiodło"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Tajna rozmowa jest gotowa."
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Zakończono tajną rozmowę."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr "Telegram"
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Oznaczono wiadomość jako przeczytaną."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Odnośnik do zaproszenia: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Utworzenie odnośnika do rozmowy się nie powiodło"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Należy być administratorem grupy, aby to zrobić."
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Dołączono do rozmowy"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Dodano rozmowę do listy pokojów rozmów."
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Rozpocznij tajną rozmowę…"
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Zaproś użytkowników przez odnośnik…"
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Usuń i wyjdź…"
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
"Nie można zalogować jako %s: nie odnaleziono pliku (klucza publicznego)."
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Proszę się upewnić, że telegram-purple jest poprawnie zainstalowane,\n"
"w tym plik .tglpub.\n"
"Jeśli używany jest SELinux (np. podczas używania Tails),\n"
"to proszę spróbować polecenia „make local_install” lub po prostu skopiować\n"
"%1$s do %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
"Nie można zalogować jako %s: problem w bibliotece „tgl”. Proszę zgłosić błąd"
" z dziennikiem debugowania."
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr "Problem w bibliotece tgl"
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
"Nie można zalogować jako %s: numer telefonu nie ma przedrostka kraju. Numery"
" muszą zaczynać się od pełnego międzynarodowego przedrostka, np. +48 dla "
"Polski."
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Niepełny numer telefonu"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr "Już usunięto tajną rozmowę"
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr "Tajna rozmowa nie jest gotowa"
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr "Tylko twórca kanału może wysyłać wiadomości."
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Nie można zaprosić znajomego do rozmowy"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "Podany użytkownik nie istnieje."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr "numer telefonu (+ przedrostek kraju)"
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Hasło (uwierzytelnianie dwustopniowe)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Zapasowa weryfikacja przez SMS\n"
"(Pomaga w przypadkach, kiedy nie jest używany program Pidgin i użytkownik nie jest pytany o kod)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "zawsze"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nigdy"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "pytanie"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Odbieranie tajnych rozmów"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Wyświetlanie znajomych jako w trybie offline po (w dniach)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Bez pobierania historii starszej niż (w dniach)\n"
"(0 oznacza brak ograniczenia)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr "Rozmiar automatycznie wczytywanych multimediów (w kilobajtach)"
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Dodawanie wszystkich rozmów grupowych do listy znajomych"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Wyświetlanie powiadomień o odebraniu"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Wysyłanie powiadomień o odebraniu podczas obecności"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr "Wtyczka protokołu Telegram."
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "Użytkownik %2$s utworzył rozmowę %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "Użytkownik %2$s zmienił tytuł na %1$s."
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "Użytkownik %s zmienił zdjęcie."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "Użytkownik %s usunął zdjęcie."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "Użytkownik %1$s dodał użytkownika %2$s przez odnośnik."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "Użytkownik %2$s dodał użytkownika %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "Użytkownik %2$s usunął użytkownika %1$s."
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "Użytkownik %2$s ustawił czas samozniszczenia na %1$d sekundę."
msgstr[1] "Użytkownik %2$s ustawił czas samozniszczenia na %1$d sekundy."
msgstr[2] "Użytkownik %2$s ustawił czas samozniszczenia na %1$d sekund."
msgstr[3] "Użytkownik %2$s ustawił czas samozniszczenia na %1$d sekund."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "Użytkownik %2$s oznaczył %1$d wiadomość jako przeczytaną."
msgstr[1] "Użytkownik %2$s oznaczył %1$d wiadomości jako przeczytane."
msgstr[2] "Użytkownik %2$s oznaczył %1$d wiadomości jako przeczytane."
msgstr[3] "Użytkownik %2$s oznaczył %1$d wiadomości jako przeczytane."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "Użytkownik %2$s usunął %1$d wiadomość."
msgstr[1] "Użytkownik %2$s usunął %1$d wiadomości."
msgstr[2] "Użytkownik %2$s usunął %1$d wiadomości."
msgstr[3] "Użytkownik %2$s usunął %1$d wiadomości."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "Użytkownik %2$s utworzył zrzut ekranu %1$d wiadomości."
msgstr[1] "Użytkownik %2$s utworzył zrzut ekranu %1$d wiadomości."
msgstr[2] "Użytkownik %2$s utworzył zrzut ekranu %1$d wiadomości."
msgstr[3] "Użytkownik %2$s utworzył zrzut ekranu %1$d wiadomości."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr "Utworzono kanał %1$s"
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr "Kanały Telegram"
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Wysłanie wiadomości się nie powiodło."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Wysłanie obrazu się nie powiodło."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "Użytkownik %s wysłał naklejkę."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr "wczytanie wiadomości się nie powiodło"
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr "[animacja]"
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr "[dźwięk]"
#: ../tgp-msg.c:515
msgid "[video]"
msgstr "[film]"
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr "<b>Przekazana wiadomość od: %s</b><br>%s"
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr "<b>Przekazana wiadomość:</b><br>%s"
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr "wczytywanie dokumentu lub obrazu się nie powiodło"
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Nie można połączyć z głównym serwerem"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr ""
"Nie można połączyć z serwerem: przekroczono czas oczekiwania na odpowiedź."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Utracono połączenie z serwerem…"
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Usługa Telegram musi zweryfikować tożsamość użytkownika. Proszę podać kod "
"logowania otrzymany w wiadomości SMS."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Kod logowania"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Proszę podać kod logowania"
#: ../tgp-request.c:54
msgid "the code"
msgstr "kod"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Anuluj"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Rejestracja"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Imię"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Nazwisko"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Zarejestruj"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Proszę zarejestrować numer telefonu."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Numer telefonu nie jest zarejestrowany. Proszę go zarejestrować w innym "
"kliencie."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Niezarejestrowany"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Wymagane jest hasło"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Proszę podać hasło dla uwierzytelniania dwustopniowego"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "OK"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Nie ustawiono hasła dla uwierzytelniania dwustopniowego. Proszę podać je w "
"rozszerzonych ustawieniach."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Nieprawidłowe hasło"
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Odebrać tajną rozmowę „%s” na tym urządzeniu?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Tajna rozmowa"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Tajne rozmowy mogą mieć tylko jeden punkt wyjściowy. Jeśli tajna rozmowa "
"zostanie odebrana na tym urządzeniu, to jej wiadomości nie będą dostępne "
"nigdzie indziej. Jeśli zostanie odrzucona, to nadal można ją odebrać na "
"innych urządzeniach."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Należy zaprosić co najmniej jednego użytkownika podając\n"
"jego imię i nazwisko (automatyczne uzupełnianie jest dostępne).\n"
"Można dodać więcej użytkowników po utworzeniu rozmowy."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nazwa użytkownika"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Utwórz rozmowę grupową"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Zaproś użytkowników"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Zmień hasło"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Bieżące"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Hasło"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Potwierdzenie"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nowe hasło"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Nieprawidłowy numer telefonu"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Proszę podać tylko numery w międzynarodowym formacie numerów telefonu, czyli + z przedrostkiem kraju i numer telefonu.\n"
"Nie należy używać innych znaków specjalnych."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr "Opuść rozmowę"
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr "Trwale opuścić tę rozmowę?"
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr "Przerwij tajną rozmowę"
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr "Trwale zakończyć tę tajną rozmowę?"
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr "Usuń kontakt"
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr "Usunąć tego użytkownika z globalnej listy kontaktów?"
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr "Opuść kanał"
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr "Opuścić ten kanał?"
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "niedawno"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "ostatni tydzień"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "ostatni miesiąc"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "nieznane"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr "Rozmowy Telegram"
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Już opuszczoną tę rozmowę."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Temat:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Odnośnik do zaproszenia:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Identyfikator rozmowy:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr "Supergrupa"
#: ../tgp-chat.c:342
msgid "Channel"
msgstr "Kanał"
#: ../tgp-chat.c:345
msgid "Group"
msgstr "Grupa"
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Użytkownicy w rozmowie"
#: ../tgp-chat.c:370
msgid "Type"
msgstr "Typ"

608
po/pt_BR.po Normal file
View file

@ -0,0 +1,608 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 22:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>, 2016\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/telegram-purple-developers/teams/53149/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../telegram-base.c:500
msgid "Couldn't create group"
msgstr "Não foi possível criar o grupo"
#: ../telegram-base.c:501
msgid "Please select at least one other user."
msgstr "Por favor, selecione pelo menos 1 usuário."
#: ../telegram-base.c:555
msgid "Query Failed"
msgstr "Falha na fila"
#: ../telegram-purple.c:162
msgid "Secret chat ready."
msgstr "Conversa secreta pronta"
#: ../telegram-purple.c:170
msgid "Secret chat terminated."
msgstr "Conversa secreta terminada."
#: ../telegram-purple.c:182
msgid "Telegram"
msgstr ""
#: ../telegram-purple.c:229
msgid "Message marked as read."
msgstr "Mensagem marcada como \"lida\"."
#: ../telegram-purple.c:339
#, c-format
msgid "Invite link: %s"
msgstr "Link de convite: %s"
#. FIXME: Can TGLCHF_MODERATOR export links?
#: ../telegram-purple.c:350
msgid "Creating chat link failed"
msgstr "Falha na criação do link para a conversa"
#: ../telegram-purple.c:351
msgid "You need to be admin of the group to do that."
msgstr "Você precisa ser Administrador do grupo para fazer isso"
#: ../telegram-purple.c:416
msgid "Chat joined"
msgstr "Entrou na conversa"
#: ../telegram-purple.c:417
msgid "Chat added to list of chat rooms."
msgstr "Conversa adicionada a listas de salas de conversa"
#: ../telegram-purple.c:443
msgid "Start secret chat..."
msgstr "Começar conversa secreta..."
#. Generate Public Link
#: ../telegram-purple.c:450
msgid "Invite users by link..."
msgstr "Convidar usuários pelo link..."
#. Delete self from chat
#: ../telegram-purple.c:458
msgid "Delete and exit..."
msgstr "Deletar e sair..."
#: ../telegram-purple.c:546
#, c-format
msgid "Unable to sign on as %s: file (public key) not found."
msgstr ""
#: ../telegram-purple.c:550
#, c-format
msgid ""
"Make sure telegram-purple is installed properly,\n"
"including the .tglpub file.\n"
"If you're running SELinux (e.g. when using Tails),\n"
"try 'make local_install', or simply copy\n"
"%1$s to %2$s."
msgstr ""
"Tenha certeza que o telegram-purple está devidamente instalado,\n"
"incluindo o arquivo .tglpub.\n"
"Se vocês estiver rodando SELinux (por exemplo: quando usa o Tails),\n"
"tente fazer uma \"instalação local\", ou simplesmente compie\n"
"%1$s para %2$s."
#: ../telegram-purple.c:572
#, c-format
msgid ""
"Unable to sign on as %s: problem in the underlying library 'tgl'. Please "
"submit a bug report with the debug log."
msgstr ""
#: ../telegram-purple.c:576
msgid "Problem in tgl"
msgstr ""
#. TRANSLATORS: Please fill in your own prefix!
#: ../telegram-purple.c:584
#, c-format
msgid ""
"Unable to sign on as %s: phone number lacks country prefix. Numbers must "
"start with the full international prefix code, e.g. +1 for USA."
msgstr ""
#: ../telegram-purple.c:589
msgid "Incomplete phone number"
msgstr "Número de telefone inválido"
#: ../telegram-purple.c:642
msgid "Secret chat was already deleted"
msgstr ""
#: ../telegram-purple.c:644
msgid "Secret chat is not ready"
msgstr ""
#: ../telegram-purple.c:652
msgid "Only the creator of a channel can post messages."
msgstr ""
#: ../telegram-purple.c:695
msgid "Cannot invite buddy to chat"
msgstr "Não foi possível convidar o amigo para a conversa"
#: ../telegram-purple.c:696
msgid "Specified user does not exist."
msgstr "O usuário especificado não existe."
#: ../telegram-purple.c:709
msgid "phone no. (+ country prefix)"
msgstr ""
#. Login
#: ../telegram-purple.c:817
msgid "Password (two factor authentication)"
msgstr "Senha (dois processos de autenticação)"
#: ../telegram-purple.c:822
msgid ""
"Fallback SMS verification\n"
"(Helps when not using Pidgin and you aren't being prompted for the code)"
msgstr ""
"Retorno de verificaçao via SMS\n"
"(Ajuda quando não estiver usando o Pidgin e não é apresentado a janela com o código)"
#: ../telegram-purple.c:828
msgid "always"
msgstr "sempre"
#: ../telegram-purple.c:829
msgid "never"
msgstr "nunca"
#: ../telegram-purple.c:830
msgid "ask"
msgstr "pergunta"
#: ../telegram-purple.c:832
msgid "Accept secret chats"
msgstr "Aceitar conversa secrete"
#: ../telegram-purple.c:836
msgid "Display buddies offline after (days)"
msgstr "Mostrar período que os amigos estão offline (dias)"
#: ../telegram-purple.c:840
msgid ""
"Don't fetch history older than (days)\n"
"(0 for unlimited)"
msgstr ""
"Não trazer históricos mais velhos que (dias)\n"
"(0 para não limitar)"
#. Media
#: ../telegram-purple.c:845
msgid "Autoload media size (kb)"
msgstr ""
#. Chats
#: ../telegram-purple.c:850
msgid "Add all group chats to buddy list"
msgstr "Adicinar todos os grupos de conversa a lista de amigos"
#. Read notifications
#: ../telegram-purple.c:855
msgid "Display notices of receipt"
msgstr "Mostrar avisos de recebimento"
#: ../telegram-purple.c:859
msgid "Send notices of receipt when present"
msgstr "Mandar avisos de recebimento quando estiver online"
#: ../telegram-purple.c:884
msgid "Telegram Protocol Plugin."
msgstr ""
#: ../tgp-msg.c:58
#, c-format
msgid "%2$s created chat %1$s."
msgstr "%2$s criouo a conversa %1$s."
#: ../tgp-msg.c:61
#, c-format
msgid "%2$s changed title to %1$s."
msgstr "%2$s mudou o assunto para %1$s,"
#: ../tgp-msg.c:64
#, c-format
msgid "%s changed photo."
msgstr "%s mudou a foto."
#: ../tgp-msg.c:67
#, c-format
msgid "%s deleted photo."
msgstr "%s deletou a foto."
#: ../tgp-msg.c:75
#, c-format
msgid "%1$s added user %2$s by link."
msgstr "%1$s adicionou o usuário %2$s por link."
#: ../tgp-msg.c:90
#, c-format
msgid "%2$s added user %1$s."
msgstr "%2$s adicionou o usuário %1$s."
#: ../tgp-msg.c:114 ../tgp-msg.c:131
#, c-format
msgid "%2$s deleted user %1$s."
msgstr "%2$s reoveu o usuário %1$s"
#: ../tgp-msg.c:138
#, c-format
msgid "%2$s set self destruction timer to %1$d second."
msgid_plural "%2$s set self destruction timer to %1$d seconds."
msgstr[0] "%2$s tempo para auto destruição configurado para %1$d segundos."
msgstr[1] "%2$s tempo para auto destruição configurado para %1$d segundos."
#: ../tgp-msg.c:144
#, c-format
msgid "%2$s marked %1$d message read."
msgid_plural "%2$s marked %1$d messages read."
msgstr[0] "%2$s marcou %1$d mensagens como lidas."
msgstr[1] "%2$s marcou %1$d mensagens como lidas."
#: ../tgp-msg.c:150
#, c-format
msgid "%2$s deleted %1$d message."
msgid_plural "%2$s deleted %1$d messages."
msgstr[0] "%2$s deletou %1$d mensagens."
msgstr[1] "%2$s deletou %1$d mensagens."
#: ../tgp-msg.c:156
#, c-format
msgid "%2$s made a screenshot of %1$d message."
msgid_plural "%2$s made a screenshot of %1$d messages."
msgstr[0] "%2$s capturou a tela de %1$d mensagens."
msgstr[1] "%2$s capturou a tela de %1$d mensagens."
#: ../tgp-msg.c:162
#, c-format
msgid "Channel %1$s created"
msgstr ""
#. FIXME: check if this makes sense
#: ../tgp-msg.c:165 ../tgp-chat.c:124 ../tgp-chat.c:576
msgid "Telegram Channels"
msgstr ""
#: ../tgp-msg.c:191
msgid "Sending message failed."
msgstr "Envio de imagem falhou."
#: ../tgp-msg.c:253
msgid "Sending image failed."
msgstr "Envio de imagem falhou."
#: ../tgp-msg.c:417
#, c-format
msgid "%s sent a sticker."
msgstr "%s enviou um adesivo."
#: ../tgp-msg.c:463
msgid "failed loading message"
msgstr ""
#: ../tgp-msg.c:498
msgid "[animation]"
msgstr ""
#: ../tgp-msg.c:515
msgid "[audio]"
msgstr ""
#: ../tgp-msg.c:515
msgid "[video]"
msgstr ""
#: ../tgp-msg.c:604
#, c-format
msgid "<b>Forwarded message from: %s</b><br>%s"
msgstr ""
#. FIXME: sometimes users aren't part of the response when receiving a
#. forwarded message
#: ../tgp-msg.c:607
#, c-format
msgid "<b>Forwarded message:</b><br>%s"
msgstr ""
#: ../tgp-msg.c:720
msgid "loading document or picture failed"
msgstr ""
#: ../tgp-net.c:281
msgid "Cannot connect to main server"
msgstr "Não pode se conectar no servidor principal"
#: ../tgp-net.c:322
msgid "Cannot connect to server: Ping timeout."
msgstr "Não pode se conectar no servidor: Ping timeout."
#: ../tgp-net.c:365
msgid "Lost connection to the server..."
msgstr "Conexão com o servidor foi perdida..."
#: ../tgp-request.c:51
msgid ""
"Telegram wants to verify your identity. Please enter the login code that you"
" have received via SMS."
msgstr ""
"Telegram quer confirmar sua identidade. Por favor insira o código recebido "
"por SMS."
#: ../tgp-request.c:54
msgid "Login code"
msgstr "Código de login"
#: ../tgp-request.c:54
msgid "Enter login code"
msgstr "Insira o código de login"
#: ../tgp-request.c:54
msgid "the code"
msgstr "o código"
#: ../tgp-request.c:54 ../tgp-request.c:104 ../tgp-request.c:198
#: ../tgp-request.c:233 ../tgp-request.c:263
msgid "OK"
msgstr "OK"
#: ../tgp-request.c:55 ../tgp-request.c:104 ../tgp-request.c:123
#: ../tgp-request.c:199 ../tgp-request.c:234 ../tgp-request.c:264
msgid "Cancel"
msgstr "Cancelar"
#: ../tgp-request.c:95
msgid "Registration"
msgstr "Registrar"
#: ../tgp-request.c:96
msgid "First name"
msgstr "Primeiro nome"
#: ../tgp-request.c:99
msgid "Last name"
msgstr "Último nome"
#: ../tgp-request.c:103
msgid "Register"
msgstr "Registrar"
#: ../tgp-request.c:103
msgid "Please register your phone number."
msgstr "Por favor registre seu número de telefone."
#. purple_request API not available
#: ../tgp-request.c:108
msgid ""
"Phone number is not registered. Please register your phone on a different "
"client."
msgstr ""
"Número de telefone não registrado. Por favor registre seu número de telefone"
" com um cliente diferente."
#: ../tgp-request.c:110
msgid "Not registered"
msgstr "Não Registrado"
#: ../tgp-request.c:122
msgid "Password needed"
msgstr "Senha necessária"
#: ../tgp-request.c:122
msgid "Enter password for two factor authentication"
msgstr "Insira a senha para o processo de autenticação dupla"
#: ../tgp-request.c:123
msgid "Ok"
msgstr "OK"
#: ../tgp-request.c:125
msgid ""
"No password set for two factor authentication. Please enter it in the "
"extended settings."
msgstr ""
"Não há senha configurado para o processo de autenticação dupla. Por favor "
"insira nas configurações expandidas."
#: ../tgp-request.c:127
msgid "Password invalid"
msgstr "Senha inválida."
#: ../tgp-request.c:150
#, c-format
msgid "Accept secret chat '%s' on this device?"
msgstr "Aceitar conversa Secreta '%s'?"
#: ../tgp-request.c:151
msgid "Secret chat"
msgstr "Conversa Secreta"
#: ../tgp-request.c:151
msgid ""
"Secret chats can only have one end point. If you accept a secret chat on "
"this device, its messages will not be available anywhere else. If you "
"decline, you can still accept the chat on other devices."
msgstr ""
"Conversas secretas podem ocorrer em apenas um local. Se você aceitar uma "
"conversa secreta nesse dispositivo, essas mensagens não estarão disponíveis "
"em nenhum outro local. Se você rejeitar, pode aceitar a conversa em outros "
"dispositivos."
#: ../tgp-request.c:182
msgid ""
"Invite at least one additional user by specifying\n"
" their full name (autocompletion available).\n"
"You can add more users once the chat was created."
msgstr ""
"Convidar ao menos mais um usuário\n"
"pelo nome completo (autocompletar disponível).\n"
"Você pode adicionar mais usuários depois que a conversa for criada."
#: ../tgp-request.c:185 ../tgp-request.c:189 ../tgp-request.c:193
msgid "Username"
msgstr "Nome de usuário"
#: ../tgp-request.c:198
msgid "Create group chat"
msgstr "Criar conversa em grupo"
#: ../tgp-request.c:198
msgid "Invite users"
msgstr "Convidar usuários"
#: ../tgp-request.c:217 ../tgp-request.c:232
msgid "Change password"
msgstr "Mudar senha"
#: ../tgp-request.c:219
msgid "Current"
msgstr "Atual"
#: ../tgp-request.c:223 ../tgp-request.c:253
msgid "Password"
msgstr "Senha"
#: ../tgp-request.c:227 ../tgp-request.c:257
msgid "Confirm"
msgstr "Confirma"
#: ../tgp-request.c:251 ../tgp-request.c:262
msgid "New password"
msgstr "Nova senha"
#. if we arrive here for the second time the specified phone number is not
#. valid. We do not
#. ask for the phone number directly, cause in that case the account would
#. still be created
#. named with the invalid phone number, even though the login will work
#: ../tgp-request.c:300
msgid "Invalid phone number"
msgstr "Número de telefone inválido"
#: ../tgp-request.c:301
msgid ""
"Please enter only numbers in the international phone number format, a leading + following by the country prefix and the phone number.\n"
"Do not use any other special chars."
msgstr ""
"Por favor insira apenas número no formato de número telefônico internacional, começando com + seguido pelo código do país e o número do telefone.\n"
"Não use caractéres especiais."
#: ../tgp-request.c:370
msgid "Leave Chat"
msgstr ""
#: ../tgp-request.c:372
msgid "Do you want to leave this chat permantently?"
msgstr ""
#: ../tgp-request.c:377
msgid "Abort Secret Chat"
msgstr ""
#: ../tgp-request.c:379
msgid "Do you want to terminate this secret chat permantently?"
msgstr ""
#: ../tgp-request.c:384
msgid "Delete Contact"
msgstr ""
#: ../tgp-request.c:386
msgid "Do you want to remove this user from your global contact list?"
msgstr ""
#: ../tgp-request.c:401
msgid "Leave Channel"
msgstr ""
#: ../tgp-request.c:403
msgid "Do you want to leave this channel?"
msgstr ""
#. This should be the language's timestamp format. This is preceded by a
#. colon.
#: ../tgp-utils.c:27
msgid "%d.%m.%Y %H:%M"
msgstr "%d.%m.%Y %H:%M"
#. This is preceded by a colon.
#: ../tgp-utils.c:48
msgid "recently"
msgstr "recentemente"
#. This is preceded by a colon.
#: ../tgp-utils.c:52
msgid "last week"
msgstr "semana passada"
#. This is preceded by a colon.
#: ../tgp-utils.c:56
msgid "last month"
msgstr "mês passado"
#. This is preceded by a colon. It refers to a point on time.
#: ../tgp-utils.c:60
msgid "unknown"
msgstr "desconhecido"
#: ../tgp-chat.c:108 ../tgp-chat.c:582
msgid "Telegram Chats"
msgstr ""
#: ../tgp-chat.c:113
msgid "You have already left this chat."
msgstr "Você já saiu dessa conversa."
#: ../tgp-chat.c:224
msgid "Subject:"
msgstr "Assunto:"
#: ../tgp-chat.c:230
msgid "Invite link:"
msgstr "Link do convite:"
#: ../tgp-chat.c:236
msgid "Chat ID:"
msgstr "Identificação da conversa:"
#: ../tgp-chat.c:342
msgid "Supergroup"
msgstr ""
#: ../tgp-chat.c:342
msgid "Channel"
msgstr ""
#: ../tgp-chat.c:345
msgid "Group"
msgstr ""
#: ../tgp-chat.c:367
msgid "Users in chat"
msgstr "Usuários no chat."
#: ../tgp-chat.c:370
msgid "Type"
msgstr ""

Some files were not shown because too many files have changed in this diff Show more