Search code examples
skypedeveloper

Double of each message in Skype Web SDK


I have been using Skype Web SDK for sometime now. However even after using the same code given in the sample, I'm getting 2 of each messages that I post when I have signed-in. Anything to used in code to restrict this?


Solution

  • Your problem seems similar to mine, you can find here what I have done to handle it : https://github.com/OfficeDev/skype-web-sdk-samples/issues/11

    Basically the message is first in a "pending" state and then in the "succeeded" state. So it appears twice. That's why you want to add a condition on the status like this one :

    else if (message.direction() == 'Outgoing' && message.status() === "Succeeded")