Plugin event just before disconnect
It does not currently seem possible to "send a message" just before a user disconnects/closes gajim.
This could be added by adding a show event inside connection.py change_status function like so:
common/connection.py
if show == 'offline':
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='offline'))
self.connected = 0
if self.connection:
p = nbxmpp.Presence(typ = 'unavailable')
p = self.add_sha(p, False)
if msg:
p.setStatus(msg)
self.connection.RegisterDisconnectHandler(self._on_disconnected)
self.connection.send(p, now=True)
self.connection.start_disconnect()
else:
self._on_disconnected()
return