getMessagesById method Null safety
- int messageId,
- MessageListParams params
Retrieves a list of BaseMessage
with given messageId
and params
.
Implementation
Future<List<BaseMessage>> getMessagesById(
int messageId,
MessageListParams params,
) async {
if (messageId <= 0) {
throw InvalidParameterError();
}
if (channelType == ChannelType.group) {
params.showSubChannelMessagesOnly = false;
}
return _sdk.api.getMessages(
channelType: channelType,
channelUrl: channelUrl,
params: params.toJson(),
messageId: messageId,
);
}