aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-12-20 09:04:17 +0100
committerdefault <nobody@localhost>2024-12-20 09:04:17 +0100
commit156d5280196c948369b186999a74c7062272b5b2 (patch)
tree18f5c38d052b4ace38142ce09202a4d3f3e6be72 /data.c
parent55fb7dcbef819478c8d54a0161fb1330622a762e (diff)
Add contact metrics to og:description.
Diffstat (limited to 'data.c')
-rw-r--r--data.c14
1 files changed, 8 insertions, 6 deletions
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);
}