getThreadedMessagesByTimestamp method
Future<ThreadedMessageResponse>
getThreadedMessagesByTimestamp(
- int timestamp,
- ThreadedMessageListParams params
Retrieves threaded messages (replies) on this message with timestamp
and params
.
Implementation
Future<ThreadedMessageResponse> getThreadedMessagesByTimestamp(
int timestamp,
ThreadedMessageListParams params,
) async {
final sdk = SendbirdSdk().getInternal();
final result = await sdk.api.send<List<BaseMessage>>(
ChannelMessagesGetRequest(
channelType: channelType,
channelUrl: channelUrl,
params: params.toJson(),
timestamp: timestamp,
parentMessageId: messageId,
),
);
return ThreadedMessageResponse(
parentMessage: result.first,
replies: result.sublist(1),
);
}