Commit 7cbc01eb authored by Philipp Hörist's avatar Philipp Hörist

Move muclumbus api JID to config

parent 7f33ecfb
Pipeline #3918 passed with stages
in 3 minutes and 13 seconds
......@@ -294,6 +294,7 @@ class Config:
'show_chatstate_in_banner': [opt_bool, True, _('Shows a text in the banner that describes the current chatstate of the contact')],
'send_chatstate_default': [opt_str, 'composing_only', _('Chat state notifications that are sent to contacts. Possible values: all, composing_only, disabled')],
'send_chatstate_muc_default': [opt_str, 'composing_only', _('Chat state notifications that are sent to the group chat. Possible values: all, composing_only, disabled')],
'muclumbus_api_jid': [opt_str, 'rodrigo.de.mucobedo@dreckshal.de'],
}, {}) # type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
__options_per_key = {
......
......@@ -37,9 +37,6 @@ from gajim.gtk.util import get_builder
from gajim.gtk.util import ensure_not_destroyed
SERVICE_JID = 'rodrigo.de.mucobedo@dreckshal.de'
class Search(IntEnum):
CONTACT = 0
MUC = 1
......@@ -399,14 +396,14 @@ class StartChatDialog(Gtk.ApplicationWindow):
if self._parameter_form is None:
con.get_module('Muclumbus').request_parameters(
SERVICE_JID,
app.config.get('muclumbus_api_jid'),
callback=self._parameters_received,
user_data=(con, text))
else:
self._parameter_form.vars['q'].value = text
con.get_module('Muclumbus').set_search(
SERVICE_JID,
app.config.get('muclumbus_api_jid'),
self._parameter_form,
callback=self._on_search_result,
user_data=con)
......@@ -423,7 +420,7 @@ class StartChatDialog(Gtk.ApplicationWindow):
self._parameter_form.vars['q'].value = text
con.get_module('Muclumbus').set_search(
SERVICE_JID,
app.config.get('muclumbus_api_jid'),
self._parameter_form,
callback=self._on_search_result,
user_data=con)
......@@ -445,7 +442,7 @@ class StartChatDialog(Gtk.ApplicationWindow):
return
con.get_module('Muclumbus').set_search(
SERVICE_JID,
app.config.get('muclumbus_api_jid'),
self._parameter_form,
items_per_page=result.max,
after=result.last,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment