From bbaaa166a84e452d74824235ec0565dbd482bc25 Mon Sep 17 00:00:00 2001 From: nekobit Date: Thu, 2 Jun 2022 06:04:00 +0000 Subject: [PATCH] Fix bug FossilOrigin-Name: 45a716cf6c964458db6adcbe8b8e566575b056cdb8388cf4f2aa1641e696ea51 --- src/status.c | 4 ++-- src/status.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status.c b/src/status.c index 8edbead..4469b33 100644 --- a/src/status.c +++ b/src/status.c @@ -165,7 +165,7 @@ int try_interact_status(struct session* ssn, mastodont_t* api, char* id) res = mastodont_unmute_conversation(api, id, &storage, NULL); mastodont_storage_cleanup(&storage); - return ret; + return res; } char* construct_status_interactions_label(char* header, int val, size_t* size) @@ -672,7 +672,7 @@ void status_interact(struct session* ssn, mastodont_t* api, char** data) void api_status_interact(struct session* ssn, mastodont_t* api, char** data) { - if (try_interact_status(ssn, api, ssn->post.id)) + if (try_interact_status(ssn, api, keystr(ssn->post.id))) { send_result(NULL, "application/json", "{\"status\":\"Success\"}", 0); } diff --git a/src/status.h b/src/status.h index df8f78e..e2dce11 100644 --- a/src/status.h +++ b/src/status.h @@ -107,4 +107,7 @@ void cleanup_media_ids(struct session* ssn, char** media_ids); // Redirects void notice_redirect(struct session* ssn, mastodont_t* api, char** data); +// API +void api_status_interact(struct session* ssn, mastodont_t* api, char** data); + #endif // STATUS_H