Commit a0f49185 authored by Philipp Hörist's avatar Philipp Hörist

MUC: Fix incorrect status message on presence

Fixes #10049
parent 8ea3c886
......@@ -428,6 +428,9 @@ def _update_status(self, show, msg, idle_time=None):
idle_time=idle_time)
self.priority = priority
self.get_module('MUC').update_presence()
app.nec.push_incoming_event(
OurShowEvent(None, conn=self, show=show))
......
......@@ -304,14 +304,8 @@ def update_presence(self, auto=False):
self._send_presence(muc_data, auto)
def _send_presence(self, muc_data, auto):
if self._con.status == 'offline':
# FIXME: Check if this
return
message = self._con.status_message
xmpp_show = helpers.get_xmpp_show(self._con.status)
idle_time = None
if auto and app.is_installed('IDLE') and app.config.get('autoaway'):
idle_sec = idle.Monitor.get_idle_sec()
......@@ -320,12 +314,13 @@ def _send_presence(self, muc_data, auto):
self._log.info('Send presence: %s, show: %s, '
'message: %s, idle_time: %s',
muc_data.occupant_jid, xmpp_show, message, idle_time)
muc_data.occupant_jid, self._con.status,
message, idle_time)
self._con.get_module('Presence').send_presence(
muc_data.occupant_jid,
show=xmpp_show,
status=self._con.status,
show=self._con.status,
status=self._con.status_message,
caps=True,
idle_time=idle_time)
......
......@@ -2113,7 +2113,6 @@ def send_status_continue(self, account, status, txt, auto):
self.delete_pep(app.get_jid_from_account(account), account)
app.connections[account].change_status(status, txt, auto)
app.connections[account].get_module('MUC').update_presence(auto)
def chg_contact_status(self, contact, show, status, account):
"""
......
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