snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 4f7a13884e9ab16003765e1b01b272a939b5899a
parent 4a0cef07098b3f8f52154ca373a8dc23efcd108b
Author: default <nobody@localhost>
Date:   Thu, 11 Jan 2024 19:29:09 +0100

Better checking for CC creation in msg_note().

Diffstat:
Mactivitypub.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -1273,8 +1273,8 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, if (xs_type(v) == XSTYPE_DICT) { char *t; - if ((t = xs_dict_get(v, "type")) != NULL && strcmp(t, "Mention") == 0) { - if ((t = xs_dict_get(v, "href")) != NULL) + if (!xs_is_null(t = xs_dict_get(v, "type")) && strcmp(t, "Mention") == 0) { + if (!xs_is_null(t = xs_dict_get(v, "href"))) cc = xs_list_append(cc, t); } }