Philipp Hörist pushed to branch mainwindow at gajim / gajim
Commits:
-
615eb3f4
by lovetox at 2021-02-05T16:59:16+01:00
5 changed files:
- gajim/common/modules/mam.py
- gajim/gtk/chat_list.py
- gajim/gtk/chat_list_stack.py
- gajim/gtk/history_sync.py
- gajim/gtk/main.py
Changes:
| ... | ... | @@ -161,7 +161,7 @@ def _mam_message_received(self, _con, stanza, properties): |
| 161 | 161 |
return
|
| 162 | 162 |
|
| 163 | 163 |
app.nec.push_incoming_event(
|
| 164 |
- NetworkIncomingEvent('mam-message-received',
|
|
| 164 |
+ NetworkIncomingEvent('raw-mam-message-received',
|
|
| 165 | 165 |
account=self._account,
|
| 166 | 166 |
stanza=stanza,
|
| 167 | 167 |
properties=properties))
|
| ... | ... | @@ -245,7 +245,7 @@ def _mam_message_received(self, _con, stanza, properties): |
| 245 | 245 |
message_id=properties.id)
|
| 246 | 246 |
|
| 247 | 247 |
app.nec.push_incoming_event(
|
| 248 |
- NetworkEvent('mam-decrypted-message-received',
|
|
| 248 |
+ NetworkEvent('mam-message-received',
|
|
| 249 | 249 |
account=self._account,
|
| 250 | 250 |
additional_data=additional_data,
|
| 251 | 251 |
correct_id=parse_correction(properties),
|
| ... | ... | @@ -253,6 +253,7 @@ def _mam_message_received(self, _con, stanza, properties): |
| 253 | 253 |
msgtxt=properties.body,
|
| 254 | 254 |
properties=properties,
|
| 255 | 255 |
kind=kind,
|
| 256 |
+ jid=str(properties.jid.bare)
|
|
| 256 | 257 |
)
|
| 257 | 258 |
)
|
| 258 | 259 |
|
| ... | ... | @@ -124,7 +124,9 @@ def update_time(self): |
| 124 | 124 |
row.update_time()
|
| 125 | 125 |
|
| 126 | 126 |
def process_event(self, event):
|
| 127 |
- if event.name == 'message-received':
|
|
| 127 |
+ if event.name in ('message-received',
|
|
| 128 |
+ 'mam-message-received',
|
|
| 129 |
+ 'gc-message-received'):
|
|
| 128 | 130 |
self._on_message_received(event)
|
| 129 | 131 |
else:
|
| 130 | 132 |
log.warning('Unhandled Event: %s', event.name)
|
| ... | ... | @@ -7,7 +7,9 @@ |
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
HANDLED_EVENTS = [
|
| 10 |
- 'message-received'
|
|
| 10 |
+ 'message-received',
|
|
| 11 |
+ 'mam-message-received',
|
|
| 12 |
+ 'gc-message-received',
|
|
| 11 | 13 |
]
|
| 12 | 14 |
|
| 13 | 15 |
|
| ... | ... | @@ -95,7 +95,7 @@ def __init__(self, account, parent): |
| 95 | 95 |
self.register_events([
|
| 96 | 96 |
('archiving-count-received', ged.GUI1, self._received_count),
|
| 97 | 97 |
('archiving-interval-finished', ged.GUI1, self._received_finished),
|
| 98 |
- ('mam-message-received', ged.PRECORE, self._nec_mam_message_received),
|
|
| 98 |
+ ('raw-mam-message-received', ged.PRECORE, self._nec_mam_message_received),
|
|
| 99 | 99 |
])
|
| 100 | 100 |
# pylint: enable=line-too-long
|
| 101 | 101 |
|
| ... | ... | @@ -78,6 +78,7 @@ def __init__(self): |
| 78 | 78 |
('message-sent', ged.OUT_POSTCORE, self._on_event),
|
| 79 | 79 |
('message-received', ged.CORE, self._on_event),
|
| 80 | 80 |
('mam-message-received', ged.CORE, self._on_event),
|
| 81 |
+ ('gc-message-received', ged.CORE, self._on_event),
|
|
| 81 | 82 |
('receipt-received', ged.GUI1, self._on_event),
|
| 82 | 83 |
('displayed-received', ged.GUI1, self._on_event),
|
| 83 | 84 |
('message-error', ged.GUI1, self._on_event),
|