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

DBus: Correctly raise NewMessage signal

parent de25b57a
Pipeline #2963 passed with stages
in 4 minutes and 8 seconds
......@@ -312,6 +312,8 @@ class GajimRemote(Server):
ged.POSTGUI, self.on_unsubscribed_presence_received)
app.ged.register_event_handler('gc-message-received',
ged.POSTGUI, self.on_gc_message_received)
app.ged.register_event_handler('decrypted-message-received',
ged.POSTGUI, self._nec_decrypted_message_received)
app.ged.register_event_handler('our-show', ged.POSTGUI,
self.on_our_status)
app.ged.register_event_handler('account-created', ged.POSTGUI,
......@@ -387,6 +389,12 @@ class GajimRemote(Server):
obj.timestamp, obj.delayed, obj.xhtml_msgtxt,
obj.displaymarking, obj.needs_highlight]))
def _nec_decrypted_message_received(self, obj):
self.raise_signal('NewMessage', (
obj.conn.name, [obj.fjid, obj.msgtxt, obj.timestamp,
obj.encrypted, obj.mtype, obj.subject,
obj.msg_log_id, obj.user_nick, obj.xhtml, obj.form_node]))
def on_our_status(self, obj):
self.raise_signal('AccountPresence', (obj.show, obj.conn.name))
......
......@@ -168,12 +168,6 @@ class ChatControlSession:
if not pm:
self.roster_message2(obj)
if app.interface.remote_ctrl:
app.interface.remote_ctrl.raise_signal('NewMessage', (
self.conn.name, [obj.fjid, obj.msgtxt, obj.timestamp,
obj.encrypted, obj.mtype, obj.subject,
obj.msg_log_id, obj.user_nick, obj.xhtml, obj.form_node]))
def roster_message2(self, obj):
"""
Display the message or show notification in the roster
......
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