getMessage static method
Retrieves a BaseMessage with given MessageRetrievalParams.
Implementation
static Future<BaseMessage> getMessage(MessageRetrievalParams params) async {
if (params.messageId < 0) {
throw InvalidParameterError();
}
final sdk = SendbirdSdk().getInternal();
return sdk.api.send<BaseMessage>(
ChannelMessageGetRequest(
channelType: params.channelType,
channelUrl: params.channelUrl,
messageId: params.messageId,
params: params,
),
);
}