summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/data.c b/data.c
index c8292ef..d9816a0 100644
--- a/data.c
+++ b/data.c
@@ -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;