I’m trying to create a message locally to display a ‘sending’ message status on the app I’m working on. Using MessageRepository.sendMessage
doesn’t cut it, as it only updates the messages live object once the message has been sent and has gotten an acknowledge response from the server. I’m trying to use MessageRepository.sendMessage.optimistically
, and it does seem to create a message, it’s id is prefixed with LOCAL_
, but it doesn’t send a request and doesn’t update the messages LiveObject. Please help, am I missing something? I’ve looked through the docs and source code but can’t get it to work.
@amezal Could you please specify which platform and version you are using?
Sure! I’m using version 2.25.2 of the ts-sdk, paired with React
@amezal Can you confirm the TS SDK version you are using? Please refer to this link for details: TS SDK Changelogs and Versioning.
Yes, I’m sorry, it was a typo, I meant 6.25.2
@amezal Thank you for your information, I will pass to our team to check on this.
Hello @amezal , Could you please provide the document you mentioned for further check?
Here.
The examples don’t include typescript, but I’m guessing the behavior should be similar anyways. Couldn’t find any examples or mentions of createMessage.optimistically but found the method on the source code and it says it creates an Amity message in cache.
Hello!
Is there any updates?
Hello, thank you for bringing this to our attention. Our team will update the documentation sample for the TypeScript SDK accordingly.
Nice! Can I get a brief of how I’m supposed to use it in the meantime? I need this feature done by next week
Hello, our team is currently working on providing the code. We will update the documentation as soon as it becomes available. Thank you for your patience.
Hello @amezal , We have updated the documentation. Please check the updated information at this link: Send a Message - Message Synchronization
Thank you guys, appreciate it!