From 21c6be642c29070a023fef56ab2aa017a308fe24 Mon Sep 17 00:00:00 2001
From: lovetox <philipp@hoerist.com>
Date: Wed, 3 Jun 2020 20:03:41 +0200
Subject: [PATCH] Client: Raise our-show event on resume

---
 gajim/common/client.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gajim/common/client.py b/gajim/common/client.py
index d85e36d1ea..907bbb1b13 100644
--- a/gajim/common/client.py
+++ b/gajim/common/client.py
@@ -226,6 +226,14 @@ def _on_resume_successful(self, _client, _signal_name):
         if self._status_sync_on_resume:
             self._status_sync_on_resume = False
             self.update_presence()
+        else:
+            # Normally show is updated when we receive a presence reflection.
+            # On resume, if show has not changed while offline, we dont send
+            # a new presence so we have to trigger the event here.
+            app.nec.push_incoming_event(
+                NetworkEvent('our-show',
+                             account=self._account,
+                             show=self._status))
 
     def _set_client_available(self):
         self._set_state(ClientState.AVAILABLE)
-- 
GitLab