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

Is there a way of getting previous messages? #53

Open James91 opened 6 years ago

mitchcapper commented 6 years ago

@James91 keep in mind that the skype server keeps limited history for conversations (normally it is kept locally in the client). Previously (or maybe it is new api not yet active) you could get some history: https://github.com/ocilo/skype-http/blob/master/src/lib/api/get-messages.ts . As to can you right now with the API? In quickly reviewing it no, I do not see previous message pulling.

James91 commented 6 years ago

Skype Web and Skype on the phone seems to get a history of messages. I'm assuming there must be a way to get the message history.

Edit - Done a postman on "v1/users/ME/conversations/conserationId/messages" with the headers and get back the expected results. I'm not the best with typescript but trying to get the get-messages.ts working.

James91 commented 6 years ago

I'm going to close this issue. I can get the messages back by editing the get-messages.ts file. I will do a pull request when I have cleaned up my code.

mitchcapper commented 6 years ago

Fantastic, thanks for your future contribution and problem solving:)

demurgos commented 6 years ago

Hi @James91 I'm happy that you managed to get older messages. Is your version available somewhere? If you don't have much time right now, I might do it now that I finally got back to this library.

I'll keep the issue open until this feature is merged.

James91 commented 6 years ago

Hi @demurgos

Sorry, I've been away for two days. My code is a bit of a hack together and I need to tidy it up before I would be happy releasing it. I kind of just copied the conversation class and changed it to the message URL. I have added the ability to add a start date too.

I'm in the middle of a project deadline and don't really have time to fix it up for the next few weeks.

demurgos commented 6 years ago

Ok, I can totally understand deadline so no problem about it. (I was myself not very active for some time).

I'll assign myself to the issue when I'll start working on it: if you have some free time before it, feel free to send a PR, even it's just a hack we'll be able to iterate.

I am mostly interested about your other issue: #55. Could you check out my branch quickly?

demurgos commented 6 years ago

@James91 Do you have more time to send a PR?

James91 commented 6 years ago

Yeah will do this weekend