skyweb
skyweb copied to clipboard
Send "edit" messages
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
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:
Will do in a day or two