skyweb icon indicating copy to clipboard operation
skyweb copied to clipboard

Send "edit" messages

Open findel opened this issue 9 years ago • 2 comments

Hey there!

Thanks so much for this library. How hard would it be to implement editing previous messages?

I had a look at the web.skype.com traffic while editing a message, and it seems like the endpoint is the same as usual for messages, and the request payload looks like so:

{
    content: "Hello back (edited)"
    contenttype: "text"
    messagetype: "RichText"
    skypeeditedid: "4059726727402763698"
}

Where content is the replacement text (I inserted the 'edited'), and the skypeeditedid is matches the original clientmessageid.

I notice that your MessageService.prototype.sendMessage function doesn't post a clientmessageid in the payload. I assume there's a good reason for not being able to, but the next poll should should bring back the clientmessageid. Could there be a way for MessageService.prototype.sendMessage to return the resulting clientmessageid?

Thanks!

Phil

findel avatar Feb 25 '16 18:02 findel

Incidentally, to "remove" a message, the same method is used and the content is set to an empty string. E.g.

{
   content: ""
   contenttype: "text"
   messagetype: "RichText"
   skypeeditedid: "1456430186187"
}

So this could also be used for that. :smile_cat:

findel avatar Feb 25 '16 20:02 findel

Will do in a day or two

ShyykoSerhiy avatar Feb 29 '16 12:02 ShyykoSerhiy