Philipp Hörist pushed to branch master at gajim / gajim
Commits:
0639bc03 by Philipp Hörist at 2019-11-09T15:04:23Z
ChatControl: Don't handle MAM groupchat messages
Fixes #9488
- - - - -
1 changed file:
- gajim/chat_control.py
Changes:
=====================================
gajim/chat_control.py
=====================================
@@ -790,6 +790,9 @@ class ChatControl(ChatControlBase):
if obj.conn.name != self.account:
return
+ if obj.properties.type.is_groupchat:
+ return
+
if obj.properties.is_muc_pm:
if not obj.with_ == self.contact.get_full_jid():
return
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/0639bc034fcd1a557fff0bd77774c86650…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/0639bc034fcd1a557fff0bd77774c86650…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f87f56ed by Philipp Hörist at 2019-11-09T14:44:57Z
GroupchatControl: Dont handle PM's if a control is open
The PrivateChatControl handles messages on its own
- - - - -
1 changed file:
- gajim/groupchat_control.py
Changes:
=====================================
gajim/groupchat_control.py
=====================================
@@ -1090,31 +1090,22 @@ class GroupchatControl(ChatControlBase):
def _nec_decrypted_message_received(self, obj):
if obj.conn.name != self.account:
return
- if obj.gc_control == self and obj.resource:
+
+ if not obj.properties.jid.bareMatch(self.room_jid):
+ return
+
+ if obj.properties.is_muc_pm and not obj.session.control:
# We got a pm from this room
nick = obj.resource
- if obj.session.control:
- # print if a control is open
- frm = ''
- if obj.properties.is_sent_carbon:
- frm = 'out'
- obj.session.control.add_message(
- obj.msgtxt,
- frm,
- tim=obj.properties.timestamp,
- displaymarking=obj.displaymarking,
- message_id=obj.properties.id,
- correct_id=obj.correct_id)
- else:
- # otherwise pass it off to the control to be queued
- self.on_private_message(nick,
- obj.properties.is_sent_carbon,
- obj.msgtxt,
- obj.properties.timestamp,
- self.session,
- obj.additional_data,
- msg_log_id=obj.msg_log_id,
- displaymarking=obj.displaymarking)
+ # otherwise pass it off to the control to be queued
+ self.on_private_message(nick,
+ obj.properties.is_sent_carbon,
+ obj.msgtxt,
+ obj.properties.timestamp,
+ self.session,
+ obj.additional_data,
+ msg_log_id=obj.msg_log_id,
+ displaymarking=obj.displaymarking)
def _nec_ping(self, obj):
if self.contact.jid != obj.contact.room_jid:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f87f56ed1e319b1bd6c4b5cf8b2afcecc5…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f87f56ed1e319b1bd6c4b5cf8b2afcecc5…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
1ac852f0 by Philipp Hörist at 2019-11-06T21:27:09Z
Logger: Improve speed of find_stanza_id()
The SQLite Query Planner does not use the best index
- - - - -
1 changed file:
- gajim/common/logger.py
Changes:
=====================================
gajim/common/logger.py
=====================================
@@ -1405,10 +1405,14 @@ class Logger:
# Stanza ID is only unique within a specific archive.
# So a Stanza ID could be repeated in different MUCs, so we
# filter also for the archive JID which is the bare MUC jid.
+
+ # Use Unary-"+" operator for "jid_id", otherwise the
+ # idx_logs_jid_id_time index is used instead of the much better
+ # idx_logs_stanza_id index
sql = '''
SELECT stanza_id FROM logs
WHERE stanza_id IN ({values})
- AND jid_id = ? AND account_id = ? LIMIT 1
+ AND +jid_id = ? AND account_id = ? LIMIT 1
'''.format(values=', '.join('?' * len(ids)))
result = self._con.execute(
sql, tuple(ids) + (archive_id, account_id)).fetchone()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/1ac852f0cd3382f944806ba6a1594fed52…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/1ac852f0cd3382f944806ba6a1594fed52…
You're receiving this email because of your account on dev.gajim.org.