From 9f3c7e0df509da909ccf418885a8162970430cce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Sat, 28 Oct 2023 23:03:30 +0300
Subject: [PATCH 1/1] Polls omitted from All Posts have no global notification
The poll post may still trigger a notification via other means,
like when following the subspace.
model.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/model.py b/model.py
index ca39e44..97cc08c 100644
--- a/model.py
+++ b/model.py
@@ -1970,6 +1970,13 @@ class Database:
self.commit()
def notify_new_poll(self, post: Post):
# If this subspace or post is omitted from All Posts, don't notify anyone.
if post.flags & Post.OMIT_FROM_ALL_FLAG:
return
subspace = self.get_subspace(id=post.subspace)
if subspace.flags & Subspace.OMIT_FROM_ALL_FLAG:
return
cur = self.conn.cursor()
cur.execute(f"""
INSERT IGNORE INTO notifs (type, dst, src, post)
--
2.25.1
text/plain
This content has been proxied by September (3851b).