Commit Graph
2326 Commits
Author SHA1 Message Date
Lonami Exo 3a56c8b0f4 Correctly handle flood_sleep_threshold=None and large values
The docstring said large values would be converted to 1 day,
but they were not. With this change None and large values are
handled correctly.

Prevents https://github.com/tulir/mautrix-telegram/issues/380.
2019-11-18 12:51:18 +01:00
Lonami Exo 6817e19923 Fix return value of send_file(album) of the same media 2019-11-10 14:59:01 +01:00
Lonami Exo 57dd0827f4 Slight improvement on ChatAction's docs 2019-11-10 14:59:01 +01:00
painor 38b929b973 Fix several typos (#1328) 2019-11-10 11:29:43 +01:00
painor 4a1310dc21 Fix RSA key unpacking on missing fingerprint (#1324) 2019-11-05 08:54:10 +01:00
painor 4839d8bf59 Fix pin_message not accepting Message objects (#1322) 2019-11-04 09:46:17 +01:00
penn5 3d1ce845be Don't parse Button's text on click (#1315) 2019-11-01 11:47:44 +01:00
Lonami Exo a1aaa96120 Fix iter_download would not determine file_size alone 2019-10-31 19:38:49 +01:00
Lonami Exo a67c94787b Make getting PhotoSize byte count more reusable internally 2019-10-31 19:38:27 +01:00
Lonami Exo 7e346180d7 Fix import ssl may fail under some Python installs
It's only required for certain proxy configurations, so we
don't want it to raise ImportError while the user imports
our library.
2019-10-31 19:20:18 +01:00
Lonami Exo 6850903d17 Fix get_edit not always returning awaitable, bump v1.10.8 2019-10-31 10:44:33 +01:00
Lonami Exo 0a3d164806 Fix handling of early edits in Conversation
The incoming messages were never updated, so of course their
edit_date wasn't either. This would cause the library to be
stuck until it timed out, because the event had already
arrived before we waited for it. As an example:

    await conv.send_message('foo')
    await sleep(1)  # bot has plenty of time to respond+edit
    await conv.get_edit()
2019-10-31 10:44:33 +01:00
YouTwitFace 4a8b19b0be Remove @ya from valid usernames (#1306) 2019-10-28 18:12:47 +01:00
Lonami Exo baacecadc5 Document some errors, bump v1.10.7 v1.10.7 2019-10-27 18:50:21 +01:00
Manuel1510 0a8103b6e8 Replace messages.getPeerDialogs with channels.getFullChannel (#1305) 2019-10-27 18:48:41 +01:00
Lonami Exo 5dcc30dcc6 Handle connection errors during auth key generation
This should help with spurious server-side disconnects during
auth_key generation, which happen most commonly on user DC
migrations.
2019-10-24 13:48:29 +02:00
Lonami Exo 08b78f0c47 Unify retry loops in mtprotosender._connect
Now the retry count is not twice its value.
2019-10-24 13:40:09 +02:00
Lonami Exo 3039915ce9 Factor out parts from mtprotosender._connect
This will help unifying the retry loop and reconnecting
if the server disconnects us during auth key generation
which will be done in a follow-up commit.
2019-10-24 13:36:32 +02:00
Lonami Exo ca2537941c Fix sending albums in conversations 2019-10-22 20:35:08 +02:00
Lonami Exo 6206a1a524 Minor documentation update 2019-10-21 11:45:31 +02:00
YouTwitFace b862f215c5 Ignore channel-only permissions in megagroups (#1292) 2019-10-11 18:04:41 +02:00
Lonami Exo 09f27f0dd7 Update Telegram's RSA keys 2019-10-03 20:52:25 +02:00
Tanner Collin 72dd36bc17 Allow edit_admin on yourself (#1285) 2019-09-29 09:19:44 +02:00
Lonami 07b0583069 Bump to v1.10.6 v1.10.6 2019-09-28 09:44:01 +02:00
penn5 88d8424474 Fix kick_participant in channels (#1284)
Presumably some server-side change made insta-unbanning no longer work.
2019-09-28 09:38:41 +02:00
Lonami Exo 5e6ff67d01 Make allow_cache do nothing for now, bump v1.10.5 (#1272) v1.10.5 2019-09-27 15:12:17 +02:00
Lonami Exo a360d74a4c Mention pomegranate under projects using the library 2019-09-27 10:41:01 +02:00
Lonami Exo 7de01a5f94 Fix resending code with empty phone hash (fix #1283) 2019-09-27 10:41:01 +02:00
Lonami 6da8d1a0ec Less confusing error for getting marked ID of PeerChannel(0)
Fixes #1282.
2019-09-24 19:01:46 +02:00
Lonami Exo d1ddfd09b6 Update missing links in the documentation summary 2019-09-24 16:19:56 +02:00
Andrebcd4 40aa46e72a Sleep automatically on slow mode error too (#1279) 2019-09-24 11:37:41 +02:00
Lonami Exo 4f6e5c5f5a Remove another debug print, bump v1.10.4 v1.10.4 2019-09-21 18:21:09 +02:00
penn5 8d5a7c6ffb Remove debugging print (#1276) 2019-09-21 17:54:45 +02:00
davtur19 b76bed3a40 Update errors' description (#1266) 2019-09-16 19:40:29 +02:00
Lonami 75ca28df49 Parse t.me/@<user> URLs as valid usernames 2019-09-16 11:36:35 +02:00
Lonami Exo c1774276c2 Fix handling of ChannelForbidden in input peer, bump v1.10.3 v1.10.3 2019-09-12 22:30:47 +02:00
Lonami Exo 9c06f29aaf Don't cache entities with min flag set, bump v1.10.2
Since layer 102, there are two access_hash. One with the min flag,
and one without it. This was causing channel invalid errors.

access_hash with min flag set can only be used to fetch files such
as profile pictures.

access_hash with min flag unset can be used under all circumstances.

Previously, the library did not distinguish between these, so it was
caching the hash that could hardly be used for anything.

With this change, only the "full" access_hash is stored, which will
work for any methods.

See also: https://core.telegram.org/api/min
v1.10.2
2019-09-12 19:19:46 +02:00
Lonami Exo 5c72e1286e Let delete_dialog work for bot accounts without erroring 2019-09-10 21:38:46 +02:00
Lonami Exo 0bf4c4ae75 Add v1.10.1 to .nix files 2019-09-10 21:38:46 +02:00
davtur19 95ba02a9d3 Add new known errors (#1265) 2019-09-10 21:09:43 +02:00
Lonami Exo 47956ddbca Fix events.Album and minor docs nit, bump to v1.10.1 v1.10.1 2019-09-09 19:21:03 +02:00
Lonami Exo b4046017a7 Bump nix expressions to 1.10 2019-09-08 12:01:17 +02:00
Lonami Exo 8ded667a6b Update to v1.10 v1.10.0 2019-09-08 11:33:19 +02:00
Lonami Exo 6e9d799103 Actually fix message.document for webpages (57049d follow-up) 2019-09-08 11:06:54 +02:00
Lonami Exo 67183ff9e8 Improve method signatures in the docs 2019-09-08 10:56:35 +02:00
Lonami Exo dab237e758 Support sending scheduled messages 2019-09-06 13:45:31 +02:00
Lonami Exo 9dd73cd494 Update to layer 105 2019-09-06 13:10:27 +02:00
Lonami Exo 57049de23a Fix message.document for webpages 2019-09-06 13:09:07 +02:00
Lonami Exo d5faf5e8aa Support getting more than 100 messages by ID 2019-08-26 12:16:46 +02:00
painor 61bc8f7fa3 Fix-up #1259 missing import (#1261) 2019-08-25 21:29:17 +02:00