diff options
| author | 2024-11-17 10:53:47 +0100 | |
|---|---|---|
| committer | 2024-11-17 10:53:47 +0100 | |
| commit | 442b46abc0afeedfeffba7f5317fa5b350ef9c56 (patch) | |
| tree | cdae445e62395edcb9eb5f1deddf64bf96379883 | |
| parent | In the insert cmdline op, don't re-add if it's already in the timeline. (diff) | |
| download | snac2-442b46abc0afeedfeffba7f5317fa5b350ef9c56.tar.gz snac2-442b46abc0afeedfeffba7f5317fa5b350ef9c56.tar.xz snac2-442b46abc0afeedfeffba7f5317fa5b350ef9c56.zip | |
mastoapi: added more checks in the notifications code.
| -rw-r--r-- | mastoapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -1784,6 +1784,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1784 | mn = xs_dict_append(mn, "created_at", xs_dict_get(noti, "date")); | 1784 | mn = xs_dict_append(mn, "created_at", xs_dict_get(noti, "date")); |
| 1785 | 1785 | ||
| 1786 | xs *acct = mastoapi_account(&snac1, actor); | 1786 | xs *acct = mastoapi_account(&snac1, actor); |
| 1787 | |||
| 1788 | if (acct == NULL) | ||
| 1789 | continue; | ||
| 1790 | |||
| 1787 | mn = xs_dict_append(mn, "account", acct); | 1791 | mn = xs_dict_append(mn, "account", acct); |
| 1788 | 1792 | ||
| 1789 | if (strcmp(type, "follow") != 0 && !xs_is_null(objid)) { | 1793 | if (strcmp(type, "follow") != 0 && !xs_is_null(objid)) { |