summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-15 17:24:44 +0200
committerdefault <nobody@localhost>2023-06-15 17:24:44 +0200
commit262de20aa8adf097454cdf4c3c36d84a8931c43b (patch)
treecd269f089affa4c3be9c35c3d76a6308e4689da5 /data.c
parent09e0d9925189a3fd5a442f9ed41fbd9fc47e1910 (diff)
Fixed voting / replying confusion.
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 b943995..ad581ee 100644
--- a/data.c
+++ b/data.c
@@ -2009,7 +2009,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) {
+ if (strcmp(xs_dict_get(obj, "attributedTo"), user->actor) == 0 &&
+ !xs_is_null(xs_dict_get(obj, "name"))) {
voted = 1;
break;
}