|
@@ -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)
|
|
|
|
|
|
{
|
|
|
- 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);
|
|
|
}
|