better message api tests
This commit is contained in:
@@ -989,11 +989,11 @@ class Channel {
|
||||
/// List the reactions for a message in the channel
|
||||
Future<QueryReactionsResponse> getReactions(
|
||||
String messageId, {
|
||||
PaginationParams? options,
|
||||
PaginationParams? pagination,
|
||||
}) =>
|
||||
_client.getReactions(
|
||||
messageId,
|
||||
options: options,
|
||||
pagination: pagination,
|
||||
);
|
||||
|
||||
/// Retrieves a list of messages by ID
|
||||
|
||||
@@ -1149,11 +1149,11 @@ class StreamChatClient {
|
||||
/// Get all the reactions for a [messageId]
|
||||
Future<QueryReactionsResponse> getReactions(
|
||||
String messageId, {
|
||||
PaginationParams? options,
|
||||
PaginationParams? pagination,
|
||||
}) =>
|
||||
_chatApi.message.getReactions(
|
||||
messageId,
|
||||
options: options,
|
||||
pagination: pagination,
|
||||
);
|
||||
|
||||
/// Update the given message
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user