diff options
| author | 2023-06-01 08:44:27 +0200 | |
|---|---|---|
| committer | 2023-06-01 08:44:27 +0200 | |
| commit | d6aa3d3c55b2fa091ba9bb9ec0ea865f0ac73530 (patch) | |
| tree | 80d89c04abacfadf6f916972c771d2dc7708e952 | |
| parent | Now you can vote from the mastoapi. (diff) | |
| download | snac2-d6aa3d3c55b2fa091ba9bb9ec0ea865f0ac73530.tar.gz snac2-d6aa3d3c55b2fa091ba9bb9ec0ea865f0ac73530.tar.xz snac2-d6aa3d3c55b2fa091ba9bb9ec0ea865f0ac73530.zip | |
More poll notify tweaks.
| -rw-r--r-- | activitypub.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index f53f442..4240486 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -520,8 +520,13 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, | |||
| 520 | return; | 520 | return; |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | /* if it's a closed poll that is not ours and we didn't vote, drop it */ | 523 | /* updated poll? */ |
| 524 | if (strcmp(type, "Update") == 0 && strcmp(type, "Question") == 0) { | 524 | if (strcmp(type, "Update") == 0 && strcmp(type, "Question") == 0) { |
| 525 | /* if it's not closed, discard */ | ||
| 526 | if (xs_is_null(xs_dict_get(msg, "closed"))) | ||
| 527 | return; | ||
| 528 | |||
| 529 | /* if it's not ours and we didn't vote, discard */ | ||
| 525 | if (!xs_startswith(id, snac->actor) && !was_question_voted(snac, id)) | 530 | if (!xs_startswith(id, snac->actor) && !was_question_voted(snac, id)) |
| 526 | return; | 531 | return; |
| 527 | } | 532 | } |