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.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
799b8c21 by wurstsalat at 2023-02-11T18:58:59+01:00
fix: Don't highlight message if it's an URI containing our nick
Fixes #11387
- - - - -
1 changed file:
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/helpers.py
=====================================
@@ -565,6 +565,12 @@ def message_needs_highlight(text: str, nickname: str, own_jid: str) -> bool:
Check text to see whether any of the words in (muc_highlight_words and
nick) appear
'''
+
+ uri = parse_uri(text)
+ if uri.type != URIType.INVALID:
+ # Don't highlight message if it's an URI
+ return False
+
special_words = app.settings.get('muc_highlight_words').split(';')
special_words.append(nickname)
special_words.append(own_jid)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/799b8c212cc1fab4c302d774a5670804…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/799b8c212cc1fab4c302d774a5670804…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
45f2388f by wurstsalat at 2023-02-10T21:08:18+01:00
fix: Nickname completion: Make sure recent nicknames list does not contain None
Fixes #11394
- - - - -
1 changed file:
- gajim/common/storage/archive.py
Changes:
=====================================
gajim/common/storage/archive.py
=====================================
@@ -870,7 +870,8 @@ def get_recent_muc_nicks(self, contact: GroupchatContact) -> list[str]:
nicknames: list[str] = []
for row in result:
- if row.contact_name not in nicknames:
+ if (row.contact_name not in nicknames and
+ row.contact_name is not None):
nicknames.append(row.contact_name)
return nicknames
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/45f2388f773b1c31a2c7d58dcda28b8a…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/45f2388f773b1c31a2c7d58dcda28b8a…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e2569508 by wurstsalat at 2023-02-10T20:50:25+01:00
fix: Plugins: Don't fail hard on uninstall errors
Fixes #11389
- - - - -
1 changed file:
- gajim/gtk/plugins.py
Changes:
=====================================
gajim/gtk/plugins.py
=====================================
@@ -353,7 +353,10 @@ def _on_uninstall_plugin(self, _button: Gtk.ToolButton) -> None:
manifest = model.get_value(iter_, Column.MANIFEST)
plugin = app.plugin_manager.get_plugin(manifest.short_name)
- assert plugin is not None
+ if plugin is None:
+ WarningDialog(_('Unable to properly remove the plugin'))
+ return
+
try:
app.plugin_manager.uninstall_plugin(plugin)
except PluginsystemError as error:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e2569508f9dc4f2f4ccae791bf04a32a…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e2569508f9dc4f2f4ccae791bf04a32a…
You're receiving this email because of your account on dev.gajim.org.