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