commit d6aa3d3c55b2fa091ba9bb9ec0ea865f0ac73530
parent 513d81c694e6310900edb8ac05a7424acc3b2db6
Author: default <nobody@localhost>
Date: Thu, 1 Jun 2023 08:44:27 +0200
More poll notify tweaks.
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/activitypub.c b/activitypub.c
@@ -520,8 +520,13 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
return;
}
- /* if it's a closed poll that is not ours and we didn't vote, drop it */
+ /* updated poll? */
if (strcmp(type, "Update") == 0 && strcmp(type, "Question") == 0) {
+ /* if it's not closed, discard */
+ if (xs_is_null(xs_dict_get(msg, "closed")))
+ return;
+
+ /* if it's not ours and we didn't vote, discard */
if (!xs_startswith(id, snac->actor) && !was_question_voted(snac, id))
return;
}