Commit graph

512 commits

Author SHA1 Message Date
Waffle
6c0eb174ed Move macro around 2021-05-04 16:50:49 +03:00
Waffle
39c497ca1e Update methods to TBA 5.2 2021-05-04 16:47:16 +03:00
Waffle
653c804037 Update types to TBA 5.2 2021-05-04 16:01:18 +03:00
Waffle Lapkin
c5ab1ac89a
Merge pull request #85 from handlerug/patch-changelog
Update changelog with new API errors info
2021-04-28 11:36:19 +03:00
handlerug
37b8256cd5
Update changelog with new API errors info 2021-04-28 15:24:21 +07:00
Waffle Lapkin
2865127963
Merge pull request #84 from handlerug/patch-error-manage-pins
Add NotEnoughRightsToManagePins and BotKickedFromSupergroup errors
2021-04-27 23:19:27 +03:00
handlerug
8a7909e7c7
Add BotKickedFromSupergroup error
Fixes teloxide/teloxide#372
2021-04-27 23:48:27 +07:00
handlerug
b3dec316e5
Add NotEnoughRightsToManagePins error
Fixes teloxide/teloxide#371
2021-04-27 23:41:14 +07:00
Hirrolot
1d20dace9a
Merge pull request #81 from teloxide/fix_docs
Fix docs
2021-04-27 06:46:34 -07:00
Waffle
a95089bc6f Fix docs
`doc_spotlight` nightly feature was renamed to `doc_notable_trait`
2021-04-27 12:25:15 +03:00
Waffle
a7d07a770c Update CHANGELOG and remove unused imports 2021-04-27 12:17:14 +03:00
Waffle
cd170951ae Update CHANGELOG 2021-04-27 12:03:43 +03:00
Waffle
ce969564ac Improve Message::url
Return urls to messages in private groups (t.me/c) when applicable.
2021-04-27 12:01:19 +03:00
Waffle
bd52e93cdb Add missing Chat::message_auto_delete_time field (tba 5.1) 2021-04-27 12:00:54 +03:00
Waffle
b55bdd274b Add Chat getters
Add getters for all `Chat` fields nested in `ChatKind`.
`Chat` has a lot of nested enums and so is hard to match on.
The getters help with this.

This patch also corrects type of `slow_mode_delay`: `Option<i32>`` -> `Option<u32>``
2021-04-27 11:42:31 +03:00
Hirrolot
7c8df5412c
Merge pull request #79 from teloxide/fix_rt_tys
Fix return types of methods
2021-04-26 12:25:49 -07:00
Waffle
5d0713e742 Fix return types of methods
Fix return types of LeaveChat, PinChatMessage, SetChatDescription, SetChatPhoto,
SetChatTitle, UnpinAllChatMessages and UnpinChatMessage: String => True
2021-04-22 17:34:47 +03:00
Waffle Lapkin
0892258897
Merge pull request #74 from teloxide/chat_member_methods
Refactor ChatMember methods
2021-03-30 16:42:17 +03:00
Waffle
c73e73ad02 fmt 2021-03-30 16:38:24 +03:00
Waffle Lapkin
ccdcda68d4
Merge branch 'master' into chat_member_methods 2021-03-30 16:26:46 +03:00
Waffle Lapkin
747898c310
Apply suggestions from code review
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2021-03-30 16:24:41 +03:00
Waffle Lapkin
5b99565289
Apply suggestions from code review
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2021-03-30 16:22:49 +03:00
Waffle Lapkin
16d0852e4a
Apply suggestions from code review
Co-authored-by: Hirrolot <hirrolot@gmail.com>
2021-03-30 15:04:44 +03:00
Hirrolot
2ab7d30ad2
Merge pull request #76 from teloxide/derive_clone
`impl Clone` for {`CacheMe<_>`, `DefaultParseMode<_>`, `Throttle<_>`}
2021-03-30 04:41:13 -07:00
Waffle Lapkin
9946a2ff20
Update CHANGELOG.md 2021-03-30 14:35:43 +03:00
Waffle
44a044af02 impl Clone for {CacheMe<_>, DefaultParseMode<_>, Throttle<_>} 2021-03-30 12:17:49 +03:00
Hirrolot
e8ca6a8445
Merge pull request #75 from teloxide/fix_send_chat_action
Fix SendChatAction return type
2021-03-29 03:59:44 -07:00
Waffle
528187d7e6 Fix SendChatAction return type 2021-03-29 13:49:52 +03:00
Waffle
23cf363271 Prevent year 2038 problem in ChatMember
This patch changes the Type of `{Restricted,Kicked}::until_date` fields:
`i32` => `i64`.

This is done to fix so called "year 2038 problem"
(See <https://en.wikipedia.org/wiki/Year_2038_problem>).
2021-03-29 10:20:03 +03:00
Waffle
3522a23289 fix docs 2021-03-29 10:16:02 +03:00
Waffle
06fa3f42e8 Update changelog 2021-03-29 00:44:42 +03:00
Waffle
75aaf56d53 Add ChatMemberKind::is_anonymous method 2021-03-29 00:33:02 +03:00
Waffle
f50e1d2d45 Make rights checks easier to use 2021-03-28 16:24:06 +03:00
Waffle
9333fca3c2 Make privileges checks easier to use
Change `ChatMemberKind::can_*` methods:
- Make them return bool, instead if option
- Return appropriate result for creators
2021-03-28 16:02:42 +03:00
Waffle
2a6e9353e7 Add is_* methods to ChatMember
Among with simple `is_{creator,administrator,restricted,left,kicked}` methods
which just check `.kind`, this patch adds `is_privileged` and `is_in_chat`
compound methods, which may be usefull.
2021-03-28 15:06:45 +03:00
Waffle
c36762c7af Add Deref impl for ChatMember to allow calling kind's methods directly 2021-03-28 14:39:03 +03:00
Hirrolot
8cd8ac96d9
Merge pull request #73 from teloxide/fix_get_chat_administrators
fix `GetChatAdministrators`
2021-03-28 04:18:47 -07:00
Waffle
02cd4dc97f Fix GetChatAdministrators output type ChatMember => Vec<ChatMember> 2021-03-28 14:02:10 +03:00
Waffle Lapkin
748e96abff
Merge pull request #72 from teloxide/make_annoying_headers_less_annoying
Make annoying headers less annoying
2021-03-28 13:58:02 +03:00
Waffle
b1e7643662 Make annoying headers less annoying
Remove commit, so they won't change every time.
Also change the text to better reflect what's going on.
2021-03-28 13:49:27 +03:00
Waffle Lapkin
afde13894e
Merge pull request #71 from diegopy/master
fix reqwest dependency features
2021-03-27 01:20:08 +03:00
Diego Roig
bebce82d22 document reqwest dependency fix 2021-03-26 17:14:10 -05:00
Diego Roig
84a18d2b5d fix reqwest dependency features 2021-03-26 16:47:03 -05:00
Hirrolot
e80470c8a5
Merge pull request #69 from teloxide/insta022
(For instant release) Fix typo: `ReplyMarkup::{keyboad => keyboard}`
2021-03-22 14:34:57 +06:00
Waffle
59cb2939f8 Fix broken link in changelog 2021-03-22 11:05:00 +03:00
Waffle
46b6c124eb Bump version (0.2.1 => 0.2.2) 2021-03-22 10:53:19 +03:00
Waffle
b5003d8b34 Fix typo: ReplyMarkup::{keyboad => keyboard}
This commit adds `ReplyMarkup::keyboard}` and deprecates `ReplyMarkup::keyboad`.
2021-03-22 10:48:56 +03:00
Waffle
907d8a23a9 doc(no_inline) prelude reexports 2021-03-22 10:46:39 +03:00
Hirrolot
fbba515800
Merge pull request #68 from teloxide/pub_unpub
Fix field privacy
2021-03-19 15:44:28 +06:00
Waffle
c2fb1d5c26 Fix API coverage version in README: "0.5.1" => "5.1" 2021-03-19 12:30:34 +03:00