Closed adjiganoff closed 1 year ago
@supersnager sorry for the false alarm, I noticed you answered a similar question in the closed issues https://github.com/chatscope/use-chat/issues/9#issuecomment-1108190552. Seems a custom storage is the way to go.
Hi @supersnager
The issue I'm struggling with is pretty basic: storage initialization with message history coming from some external data source. Or as a more advanced example: lazily load earlier messages and update the storage with the response.
I've looked through the
IStorage
interface andBasicStorage
implementation, but didn't find a method (something likeaddMessages
) that would do it. One option I'm considering is to extendBasicStorage
with such method and then call the method from the service.Please, suggest how to do it properly and thanks for the awesome library!