diff options
| author | 2023-05-30 06:12:10 +0200 | |
|---|---|---|
| committer | 2023-05-30 06:12:10 +0200 | |
| commit | 32f31e490b028ee6e9d9c4fc8706bba31e11aa88 (patch) | |
| tree | a4ad9db3066bebc6dbee8d1539ff0085ed911bde /activitypub.c | |
| parent | Added some limits to poll options. (diff) | |
| download | snac2-32f31e490b028ee6e9d9c4fc8706bba31e11aa88.tar.gz snac2-32f31e490b028ee6e9d9c4fc8706bba31e11aa88.tar.xz snac2-32f31e490b028ee6e9d9c4fc8706bba31e11aa88.zip | |
Log when a poll is closed.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 62d4cda..c29a14b 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1399,7 +1399,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) | |||
| 1399 | } | 1399 | } |
| 1400 | else | 1400 | else |
| 1401 | if (strcmp(utype, "Note") == 0) { | 1401 | if (strcmp(utype, "Note") == 0) { |
| 1402 | char *id = xs_dict_get(object, "id"); | 1402 | const char *id = xs_dict_get(object, "id"); |
| 1403 | 1403 | ||
| 1404 | object_add_ow(id, object); | 1404 | object_add_ow(id, object); |
| 1405 | timeline_touch(snac); | 1405 | timeline_touch(snac); |
| @@ -1408,12 +1408,13 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) | |||
| 1408 | } | 1408 | } |
| 1409 | else | 1409 | else |
| 1410 | if (strcmp(utype, "Question") == 0) { | 1410 | if (strcmp(utype, "Question") == 0) { |
| 1411 | char *id = xs_dict_get(object, "id"); | 1411 | const char *id = xs_dict_get(object, "id"); |
| 1412 | const char *closed = xs_dict_get(object, "closed"); | ||
| 1412 | 1413 | ||
| 1413 | object_add_ow(id, object); | 1414 | object_add_ow(id, object); |
| 1414 | timeline_touch(snac); | 1415 | timeline_touch(snac); |
| 1415 | 1416 | ||
| 1416 | snac_log(snac, xs_fmt("updated poll %s", id)); | 1417 | snac_log(snac, xs_fmt("%s poll %s", closed == NULL ? "updated" : "closed", id)); |
| 1417 | } | 1418 | } |
| 1418 | else | 1419 | else |
| 1419 | snac_log(snac, xs_fmt("ignored 'Update' for object type '%s'", utype)); | 1420 | snac_log(snac, xs_fmt("ignored 'Update' for object type '%s'", utype)); |