gajim-plural/gajim
Philipp Hörist cdc2ec9205 Fix not requesting roster on empty cache.db
The purpose of

`if version and not gajim.contacts.get_contacts_jid_list()`

seemed to be that when cache.db is empty (maybe it was deleted)
`gajim.contacts.get_contacts_jid_list()` should come back empty.

So on an empty roster cache, version was set to None, so that we
request in any case a new roster.

The Problem is that `gajim.contacts.get_contacts_jid_list()` is not
a good indication for an empty cache.db. On start we trigger a
`RosterReceivedEvent` which does a DB query to get the roster. Even
if that DB query comes up empty, the Event is still pushed.

In the event handler `_nec_roster_received` in roster_window.py we
add then previously open controls and our self (if the option is set)
to the roster, making `gajim.contacts.get_contacts_jid_list()` return
these contacts and hence the condition in `request_roster()` always
False.

So the version is set in the roster request, and if there is no new
version on the server, we request no new roster even though we only
have ourself and previously open controls in our roster.

As a solution for this we delete the roster version from the config
in `RosterReceivedEvent` if the DB query comes back empty, which
triggers a new roster request.
2017-07-19 10:52:02 +02:00
..
command_system
common Fix not requesting roster on empty cache.db 2017-07-19 10:52:02 +02:00
plugins Fix memory leak in plugins window 2017-07-10 01:15:30 +02:00
Makefile.am
adhoc_commands.py
advanced_configuration_window.py fixed lookup of description for keyed options 2017-07-11 20:35:47 +02:00
app_actions.py
atom_window.py
cell_renderer_image.py
chat_control.py Use namedtuples for results from the DB 2017-07-12 22:34:55 +02:00
chat_control_base.py Fix activity timers for groupchat 2017-07-16 23:58:54 +02:00
config.py Fix not working ManagePEPServicesWindow Dialog 2017-07-16 22:49:34 +02:00
conversation_textview.py Fix displaying links in textview 2017-07-04 12:26:05 +02:00
dataforms_widget.py
dialogs.py Fix not working ManagePEPServicesWindow Dialog 2017-07-16 22:49:34 +02:00
disco.py
emoticons.py Fix emoticons module import on windows 2017-07-03 11:32:47 +02:00
features_window.py
filetransfers_window.py
gajim-remote.py
gajim.py
gajim_themes_window.py
groupchat_control.py Fix activity timers for groupchat 2017-07-16 23:58:54 +02:00
groups.py
gtkexcepthook.py
gtkgui_helpers.py
gtkspell.py
gui_interface.py Rework emoticon menu 2017-07-02 21:27:44 +02:00
gui_menu_builder.py
history_manager.py
history_window.py
htmltextview.py
ipython_view.py
logind_listener.py
message_control.py
message_textview.py
message_window.py Rework emoticon menu 2017-07-02 21:27:44 +02:00
music_track_listener.py
negotiation.py
network_watcher.py
notify.py
profile_window.py
pylint.rc
remote_control.py
roster_window.py Use namedtuples for results from the DB 2017-07-12 22:34:55 +02:00
search_window.py
secrets.py
session.py
shortcuts_window.py
statusicon.py
tooltips.py
upower_listener.py
vcard.py