ocilo / skype-http

Unofficial Skype API for Node.js via HTTP
https://ocilo.github.io/skype-http
MIT License
51 stars 24 forks source link

Send invite to conversation #84

Open grigori-gru opened 6 years ago

grigori-gru commented 6 years ago

Hello! Nice work) We use your project in matrix-skype-puppet. Is there any way to add someone from contacts to the chat group/conversation using your api? Maybe it's somehow possible by sending them 'share link' but I can't find how to get it?

demurgos commented 6 years ago

Hi, thanks for using the library and reporting issues. I'm now watching your project: it has some interesting issues (some of them were also fixed on master, you can install it with skype-http@next, but it also has breaking changes due to the new contact API).

Regarding the addition of contacts, it is currently not possible but I'd like to have it. If you want to help, I'd be happy to help you and eventually give you write access (it may help with your library). The first step would be to find how Skype does it. I usually do 3 things: check the HTTP requests of the web client when I perform the action, check SkPy (a Python library for Skype) or look into their source code.

I'm currently in the process of updating the conversation API so it may be the occasion to add it. I'll try to merge my changes quickly.

I am trying to move this library to be a thinner wrapper around Skype: it would focus on abstracting the HTTP calls and guaranteeing the properties on the return values with runtime checks. It currently manually remaps some of the objects but it gets harder to maintain. Also I used typedoc to generate documentation but this no longer works well, so I need to better document it and find a workaround.

grigori-gru commented 6 years ago

Thanks for feedback! I'll check it out and let you know if find out how Skype does it.

demurgos commented 6 years ago

I'm re-opening until it is supported.

grigori-gru commented 6 years ago

@demurgos As I see you're going to remove checking EventMessage.resourceType in the next version?

demurgos commented 6 years ago

See my reply in the PR thread

You'll still need to check event.resourceType: there will be more events (endpoint and user presence) discriminated by this property. Also for messages event.resource.type becomes event.resource.messageType to match the real Skype API.