emesene/emesene-supported-plugins — Issue #55: New messages are shown has old messages in lastSaid
Author: Stiveknx
Created: 2011-12-25 20:36:48+00:00
State: open

When I receive a new message, when the window is closed, the plugin loads this new message as an old message.

I think that happens cause, when the new message comes, the logger adds the message to the log, and when session.logger.get_chats() is called, it loads this message.
To fix, I think session.logger.get_chats, should run before the logger adds this new message.

I tried to fix checking if the message's timestamp equals or it's similar to the actual timestamp and del results[-1] inside _on_chats_ready, but that's too ugly to do . Also, if the user has configured to get 7 messages, will show only 6 so...