better message api tests

This commit is contained in:
Salvatore Giordano
2021-06-26 13:37:40 +02:00
parent ff8ff6d7ce
commit 9857db0635
4 changed files with 139 additions and 35 deletions
@@ -143,12 +143,12 @@ class MessageApi {
/// Get all the reactions for a [messageId]
Future<QueryReactionsResponse> getReactions(
String messageId, {
PaginationParams? options,
PaginationParams? pagination,
}) async {
final response = await _client.get(
'/messages/$messageId/reactions',
queryParameters: {
if (options != null) ...options.toJson(),
if (pagination != null) ...pagination.toJson(),
},
);
return QueryReactionsResponse.fromJson(response.data);