Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Televerse v1.12.7 #200

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.12.7

- Now Televerse uses `APIMethod` instead of hard coded strings to call API endpoints.
- Cleared missing `APIMethod` implementations and typos.
- Cleaned up the code.

# 1.12.6

- Updated Example File
Expand Down
2 changes: 1 addition & 1 deletion lib/src/telegram/models/inline_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class InlineQuery {
'from': from.toJson(),
'query': query,
'offset': offset,
'chat_type': chatType?.index,
'chat_type': chatType?.value,
'location': location?.toJson(),
}..removeWhere((key, value) => value == null);
}
Expand Down
12 changes: 6 additions & 6 deletions lib/src/televerse/context/mixins/inline_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ mixin InlineQueryMixin on Context {
InlineQuery get inlineQuery => update.inlineQuery!;

/// Answer the inline query.
Future<void> answer(
Future<bool> answer(
List<InlineQueryResult> results, {
int? cacheTime,
bool? isPersonal,
String? nextOffset,
InlineQueryResultsButton? button,
}) async {
await api.answerInlineQuery(
}) {
return api.answerInlineQuery(
inlineQuery.id,
results,
cacheTime: cacheTime,
Expand All @@ -26,14 +26,14 @@ mixin InlineQueryMixin on Context {
}

/// Answer the inline query with a list of articles.
Future<void> answerWithArticles(
Future<bool> answerWithArticles(
List<InlineQueryResultArticle> articles, {
int? cacheTime,
bool? isPersonal,
String? nextOffset,
InlineQueryResultsButton? button,
}) async {
await api.answerInlineQuery(
}) {
return api.answerInlineQuery(
inlineQuery.id,
articles,
cacheTime: cacheTime,
Expand Down
Loading