taksan / skype-java-api

Skype API for Java, based on Skype4Java library
128 stars 60 forks source link

How to get message in certain time frame? #80

Closed aszwaj closed 7 years ago

aszwaj commented 8 years ago

I try to use skype-java-api to get history of certain chat. I would like to get message e.g. from last two days. I used Chat.getRecentChatMessages() but it returns only 10 items. The other option Chat.getAllChatMessages() return much more - 1500+ - but the last message it gives is from Feb 2016.

Is there any other way to access messages from Skype chat?

Cuniq commented 8 years ago

Chat.getAllChatMessages() returns an array of ChatMessage. Why don't you use ChatMessage. getTime() to find the messages that fit your needs?

aszwaj commented 8 years ago

My mistake. Chat.getAllChatMessages() actually provides all messages having most recent on a top. I assumed (but did not verified it) that most recent will go to the end of the array. Sorry for bothering you.