commit d6aa3d3
default
·
2023-06-01 06:44:27 +0000 UTC
parent 513d81c
More poll notify tweaks.
1 files changed,
+6,
-1
+6,
-1
1@@ -520,8 +520,13 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
2 return;
3 }
4
5- /* if it's a closed poll that is not ours and we didn't vote, drop it */
6+ /* updated poll? */
7 if (strcmp(type, "Update") == 0 && strcmp(type, "Question") == 0) {
8+ /* if it's not closed, discard */
9+ if (xs_is_null(xs_dict_get(msg, "closed")))
10+ return;
11+
12+ /* if it's not ours and we didn't vote, discard */
13 if (!xs_startswith(id, snac->actor) && !was_question_voted(snac, id))
14 return;
15 }