taksan / skype-java-api

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

handle properly long inactivity pauses and recieving duplicates #47

Closed razum2um closed 10 years ago

razum2um commented 10 years ago

this resolves #30 & #46

inspired by https://github.com/jmandel/sevabot/commit/29f21c1430ef28511b20dbfd53a1fa1c04fb0469 also see: https://github.com/opensourcehacker/sevabot/issues/68 && https://github.com/bkmeneguello/sevabot/commit/f783e9849e1856ea812567f9eacc46b50f211a93

the problem is, that after some time of inactivity skype won't call "CHATMESSAGE 19017 STATUS RECEIVED" on incoming message ever, it calls only "CHAT #.../... ACTIVITY_TIMESTAMP 1403896553". Thats how we are loosing messages. I consider that as skype bug.

besides of that, patch is handling messages, which are coming while bot is being restarted, for details why HashMap & lastReceivedId weren't working see comment around bytes:

I also insist, that this logic about deduplicating and missing messages querieng do belong to library, not application layer.

Anyway within one chat it's perfect for me.

aaomidi commented 10 years ago

Can you update the Maven Repo with this new update?