[Question]
The onApiResult
messages are being returned as SendableMessage
instead of BaseMessage
.
Will the return type of onApiResult
be changed to BaseMessage
in the future, or is it safe to use properties from SendableMessage
without any concerns?
const collection: MessageCollection = channel.createMessageCollection({
filter,
prevResultLimit,
nextResultLimit,
startingPoint,
});
collection
.initialize(MessageCollectionInitPolicy.CACHE_AND_REPLACE_BY_API)
.onApiResult((err: Error | null, messages: BaseMessage[] | null) => {
// ...
}
[SDK Version]
“@sendbird/chat”: “^4.19.8”