Skip to content

Commit

Permalink
Merge #200: Televerse v1.12.7
Browse files Browse the repository at this point in the history
  • Loading branch information
HeySreelal authored Jan 17, 2024
2 parents 9236cfc + 1efd49e commit 65dc201
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 150 deletions.
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

0 comments on commit 65dc201

Please sign in to comment.