How disable auto resend message?

Hi, want to know how to disable auto resend message feature or how to listen auto resend success event ?

Steps:

  1. Device Online
  2. Send Message
  3. Console:
    • on pending
    • on success
  4. Device office
  5. Send Message
  6. Console:
    • on pending
    • on failed
  7. Device online
  8. Counterpart receive message (Unexpected)

refs: “@sendbird/chat”: “4.0.0-beta.10”

// Setup
const params: SendbirdChatParams<[GroupChannelModule]> = {
    appId: Config.SENDBIRD_APP_ID,
    localCacheEnabled: false,
    modules: [new GroupChannelModule()],
};

SendbirdChat.init(params);


// Send Message
channel
  .sendUserMessage(params)
  .onPending((m) => {
    console.log("on pending");
  })
  .onFailed((_, m) => {
    console.log("on failed");
  })
  .onSucceeded((m) => {
    console.log("on success");
  });

Hi @Peter_Cheng – I have picked up your message. I will get back to you with answers.

1 Like

Hi @Peter_Cheng - as per the design, if the connection is restored within the 10 seconds of sending the message the message is delivered, otherwise the timeout exception is thrown.

HI @taha.saghir, but at my case, the message stil auto resend after onFailed.

Steps.

  1. Device offlice
  2. Send Message
  3. Console: on pending
  4. After 10s
  5. Console: on failed
  6. Device online
  7. Counterpart receive message <— Unexpected

That’s interesting. Can you please send us the export of console logs and network HAR from your browser? Also, please add the current timestamp to your logs.

Hi @taha.saghir
Sent via DM

1 Like

Hi @Peter_Cheng,

Quick update - the issue has been reported to our engineering team, will let you know as soon as I have an update from them.

1 Like

Hi @Peter_Cheng - the fix has been released for this issue. Can you please test it again?