Philipp Hörist pushed to branch master at gajim / gajim
Commits:
fa3f2698 by Philipp Hörist at 2025-04-15T21:19:57+02:00
cfix: Search: Filter out moderated messages in the SQL query
- - - - -
2 changed files:
- gajim/common/storage/archive/storage.py
- gajim/gtk/search_view.py
Changes:
=====================================
gajim/common/storage/archive/storage.py
=====================================
@@ -809,6 +809,7 @@ def search_archive(
stmt.where(
Message.text.ilike(f'%{query}%'),
Message.timestamp.between(after, before),
+ ~Message.moderation.has(),
)
.order_by(sa.desc(Message.timestamp), sa.desc(Message.pk))
.execution_options(yield_per=25)
=====================================
gajim/gtk/search_view.py
=====================================
@@ -227,9 +227,6 @@ def _add_results(self) -> None:
assert self._results_iterator is not None
has_results = False
for message in itertools.islice(self._results_iterator, 25):
- if message.moderation is not None:
- continue
-
result_row = ResultRow(message)
self._ui.results_listbox.append(result_row)
has_results = True
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fa3f2698886a0e89690ba71a849e3ab2a82f40a7
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fa3f2698886a0e89690ba71a849e3ab2a82f40a7
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]