Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
508b0523 by wurstsalat at 2023-02-19T22:34:17+01:00
cfix: Improve get_recent_muc_nicks query
- - - - -
1 changed file:
- gajim/common/storage/archive.py
Changes:
=====================================
gajim/common/storage/archive.py
=====================================
@@ -848,21 +848,22 @@ def get_recent_muc_nicks(self, contact: GroupchatContact) -> list[str]:
'''
Queries the last 50 message rows and gathers nicknames in a list
'''
+ jids = [contact.jid]
account_id = self.get_account_id(contact.account)
+ kinds = map(str, [KindConstant.GC_MSG])
sql = '''
SELECT contact_name
- FROM logs NATURAL JOIN jids
- WHERE +jid = ?
- AND account_id = ?
- AND kind = ?
+ FROM logs NATURAL JOIN jids WHERE jid IN ({jids})
+ AND account_id = {account_id}
+ AND kind IN ({kinds})
ORDER BY time DESC
- '''
+ '''.format(jids=', '.join('?' * len(jids)),
+ account_id=account_id,
+ kinds=', '.join(kinds))
+
- result = self._con.execute(sql, (contact.jid,
- account_id,
- KindConstant.GC_MSG
- )).fetchmany(50)
+ result = self._con.execute(sql, (tuple(jids))).fetchmany(50)
nicknames: list[str] = []
for row in result:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/508b0523d3497f60d5fef00d015deec8…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/508b0523d3497f60d5fef00d015deec8…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
64719feb by Daniel Brötzmann at 2023-02-17T13:27:19+00:00
cfix: HighlightTest: Fix xmpp address test
- - - - -
1 changed file:
- test/common/test_message_needs_highlight.py
Changes:
=====================================
test/common/test_message_needs_highlight.py
=====================================
@@ -4,7 +4,7 @@
from gajim.common.helpers import message_needs_highlight
app.settings.set('muc_highlight_words', 'test;gajim')
-JID = 'romemo@xmppserver'
+JID = 'juliet@xmppserver'
NICK = 'Romeo'
@@ -20,7 +20,7 @@ def test_highlight(self):
t_text6 = 'Are you using Gajim?'
t_text7 = 'Did you test this?'
t_text8 = 'Hi romeo'
- t_text9 = 'My address is romeo@xmppserver'
+ t_text9 = 'My address is juliet@xmppserver'
f_text1 = 'RomeoDoes this work?'
f_text2 = ''
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/64719febddfb2dfe7e639f302cd2bb34…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/64719febddfb2dfe7e639f302cd2bb34…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e57e7b5c by wurstsalat at 2023-02-14T21:59:07+01:00
imprv: Improve get_recent_muc_nicks query
- - - - -
1 changed file:
- gajim/common/storage/archive.py
Changes:
=====================================
gajim/common/storage/archive.py
=====================================
@@ -848,25 +848,21 @@ def get_recent_muc_nicks(self, contact: GroupchatContact) -> list[str]:
'''
Queries the last 50 message rows and gathers nicknames in a list
'''
- jids = [contact.jid]
account_id = self.get_account_id(contact.account)
- kinds = map(str, [KindConstant.STATUS,
- KindConstant.GCSTATUS,
- KindConstant.ERROR])
sql = '''
SELECT contact_name
- FROM logs NATURAL JOIN jids WHERE jid IN ({jids})
- AND account_id = {account_id}
- AND kind NOT IN ({kinds})
+ FROM logs NATURAL JOIN jids
+ WHERE +jid = ?
+ AND account_id = ?
+ AND kind = ?
ORDER BY time DESC
- '''.format(jids=', '.join('?' * len(jids)),
- account_id=account_id,
- kinds=', '.join(kinds))
+ '''
- result = self._con.execute(
- sql,
- tuple(jids)).fetchmany(50)
+ result = self._con.execute(sql, (contact.jid,
+ account_id,
+ KindConstant.GC_MSG
+ )).fetchmany(50)
nicknames: list[str] = []
for row in result:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e57e7b5cb18e920746a3e0e39f5e6153…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e57e7b5cb18e920746a3e0e39f5e6153…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
63a0e85b by Philipp Hörist at 2023-02-13T19:59:30+01:00
imprv: Add audio/x-wav to default mime types
- - - - -
1 changed file:
- gajim/common/const.py
Changes:
=====================================
gajim/common/const.py
=====================================
@@ -1011,6 +1011,7 @@ def is_active(self):
'audio/x-flac',
'audio/x-m4a',
'audio/x-matroska',
+ 'audio/x-wav',
# font/*
'font/ttf',
'font/woff',
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/63a0e85b1e0510a98a1984861ceb6743…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/63a0e85b1e0510a98a1984861ceb6743…
You're receiving this email because of your account on dev.gajim.org.