diff options
| author | 2023-04-14 08:37:33 +0200 | |
|---|---|---|
| committer | 2023-04-14 08:37:33 +0200 | |
| commit | 35c611b8b901c59f2532b691ad6b25ded86938f9 (patch) | |
| tree | b06c27d1ea17559782059ef884a4acc542b7f9b3 /data.c | |
| parent | Added a dummy 'created_at' field for accounts that don't have a date. (diff) | |
| download | snac2-35c611b8b901c59f2532b691ad6b25ded86938f9.tar.gz snac2-35c611b8b901c59f2532b691ad6b25ded86938f9.tar.xz snac2-35c611b8b901c59f2532b691ad6b25ded86938f9.zip | |
Fixed crash in notification list.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -1558,7 +1558,7 @@ xs_dict *notify_get(snac *snac, const char *id) | |||
| 1558 | 1558 | ||
| 1559 | 1559 | ||
| 1560 | xs_list *notify_list(snac *snac, int new_only) | 1560 | xs_list *notify_list(snac *snac, int new_only) |
| 1561 | /* returns a list of notifications, optionally only the new ones */ | 1561 | /* returns a list of notification ids, optionally only the new ones */ |
| 1562 | { | 1562 | { |
| 1563 | xs *t = NULL; | 1563 | xs *t = NULL; |
| 1564 | 1564 | ||
| @@ -1579,9 +1579,7 @@ xs_list *notify_list(snac *snac, int new_only) | |||
| 1579 | if (t != NULL && strcmp(id, t) < 0) | 1579 | if (t != NULL && strcmp(id, t) < 0) |
| 1580 | continue; | 1580 | continue; |
| 1581 | 1581 | ||
| 1582 | xs *noti = notify_get(snac, id); | 1582 | out = xs_list_append(out, id); |
| 1583 | |||
| 1584 | out = xs_list_append(out, noti); | ||
| 1585 | } | 1583 | } |
| 1586 | 1584 | ||
| 1587 | return out; | 1585 | return out; |