diff options
author | default <nobody@localhost> | 2024-01-18 23:04:37 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-18 23:04:37 +0100 |
commit | 65040b65a35e36423e7154e643d9c69401ec5b2c (patch) | |
tree | f6e0c65299925e342920586f183c1fff4d3b8c2a /data.c | |
parent | 1aff468a552b19ada46d67077b3acd58aa0d0c85 (diff) |
New function get_atto(), to get the attributedTo field.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2345,7 +2345,8 @@ int was_question_voted(snac *user, const char *id) xs *obj = NULL; if (valid_status(object_get_by_md5(md5, &obj))) { - if (strcmp(xs_dict_get(obj, "attributedTo"), user->actor) == 0 && + char *atto = get_atto(obj); + if (atto && strcmp(atto, user->actor) == 0 && !xs_is_null(xs_dict_get(obj, "name"))) { voted = 1; break; |