From cc727e972f7fdc871ee1f42cf014151b67422bf0 Mon Sep 17 00:00:00 2001 From: nirav Date: Tue, 26 Mar 2019 07:54:56 +0530 Subject: Update login flow and timeline window --- src/status.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/status.c') diff --git a/src/status.c b/src/status.c index 69d1fa2..cfb3645 100644 --- a/src/status.c +++ b/src/status.c @@ -3,6 +3,7 @@ #include #include #include "status.h" +#include "account.h" #include "log.h" struct status *status_from_json(const char *json_data) @@ -57,6 +58,11 @@ struct status *status_from_json_t(const json_t *root) s->url = strdup(json_string_value(url)); } + json_t *account = json_object_get(root, "account"); + if (json_is_object(account)) { + s->account = account_from_json_t(account); + } + json_t *in_reply_to_id = json_object_get(root, "in_reply_to_id"); if (json_is_string(in_reply_to_id)) { s->in_reply_to_id = strdup(json_string_value(in_reply_to_id)); @@ -100,6 +106,8 @@ void status_free(struct status *s) free(s->uri); if (s->url) free(s->url); + if (s->account) + account_free(s->account); if (s->in_reply_to_id) free(s->in_reply_to_id); if (s->in_reply_to_account_id) -- cgit v1.2.3