Closed Stiveknx closed 12 years ago
@pepeleproso, maybe you know a better way, but the only way I see is adding *args to self.session.logger.get_chats and passing that back to the callback...
I think that's the better solution, will make a patch later
@pepeleproso, a better solution is probably defining the _on_chats_ready method as function inside the _on_started_message method. That way you can still access the conversation variable as set in _on_started_message in the _on_chats_ready function. Some small testing application showed it works for me, but I'm not sure if it works here too.
@pepeleproso, even easier, I think you could just use a Queue instead of a list. This is what the logger uses, and that is the reason why the conversations are in reverse order. Lists are LIFO and Queues FIFO
please test if the fix works for you
Fixed this bug, but now, the messages are loaded 2 times (the first time it's the conversation and the second it's when the plugin loads the messages again) ...
http://i.minus.com/ipe87R0Ll2gQb.png
I think the plugin shouldn't load the conversations if you got disconnected and connect again ... Cause you have the conversation open you won't loose the text, it's useful only when you open a new conversation ;s
Maybe we just should call self.new_conversation(cid, [account])
, but self.reuse_conversation(cid, [account)
in renew_session
in gui/base/ConversationManager.py. That is, unless after_new_conversation has to be called, but I don't think so. I'll push a fix to emesene.
Fix pushed to emesene
Fixed.
@Sbte You open an conversation, than you click in contact name again on contact list, the same problem from my last comment happend, maybe you can do the same thing you did with reuse_conversation when you open a conversation from contact list when the conversation already exists ...
Fixed
Here's the case: When you logout and login in again, last said loads the conversations, if you have more than one window open, he shows last conversations from another conversation in that window and vice-versa.
Here's the screenshot, trying to explain:
http://i.minus.com/jD9gQeJJPABCi.png http://i.minus.com/jbtZ5Zt6JznCJV.png