From 156d5280196c948369b186999a74c7062272b5b2 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 20 Dec 2024 09:04:17 +0100 Subject: Add contact metrics to og:description. --- data.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'data.c') diff --git a/data.c b/data.c index 823975e..36c41f3 100644 --- a/data.c +++ b/data.c @@ -2842,7 +2842,7 @@ xs_str *notify_check_time(snac *snac, int reset) xs_dict *markers_get(snac *snac, const xs_list *markers) { - xs_dict *data = NULL; + xs *data = NULL; xs_dict *returns = xs_dict_new(); xs *fn = xs_fmt("%s/markers.json", snac->basedir); const xs_str *v = NULL; @@ -2868,7 +2868,7 @@ xs_dict *markers_get(snac *snac, const xs_list *markers) xs_dict *markers_set(snac *snac, const char *home_marker, const char *notify_marker) /* gets or sets notification marker */ { - xs_dict *data = NULL; + xs *data = NULL; xs_dict *written = xs_dict_new(); xs *fn = xs_fmt("%s/markers.json", snac->basedir); FILE *f; @@ -2882,19 +2882,21 @@ xs_dict *markers_set(snac *snac, const char *home_marker, const char *notify_mar data = xs_dict_new(); if (!xs_is_null(home_marker)) { - xs_dict *home = xs_dict_new(); + xs *home = xs_dict_new(); + xs *s_tid = tid(0); home = xs_dict_append(home, "last_read_id", home_marker); home = xs_dict_append(home, "version", xs_stock(0)); - home = xs_dict_append(home, "updated_at", tid(0)); + home = xs_dict_append(home, "updated_at", s_tid); data = xs_dict_set(data, "home", home); written = xs_dict_append(written, "home", home); } if (!xs_is_null(notify_marker)) { - xs_dict *notify = xs_dict_new(); + xs *notify = xs_dict_new(); + xs *s_tid = tid(0); notify = xs_dict_append(notify, "last_read_id", notify_marker); notify = xs_dict_append(notify, "version", xs_stock(0)); - notify = xs_dict_append(notify, "updated_at", tid(0)); + notify = xs_dict_append(notify, "updated_at", s_tid); data = xs_dict_set(data, "notifications", notify); written = xs_dict_append(written, "notifications", notify); } -- cgit v1.2.3