Use xs_is_null() instead of NULL comparison when getting actor's name.

This commit is contained in:
default 2022-10-07 17:25:40 +02:00
parent d79591c277
commit 8ffeab7884

4
html.c
View file

@ -166,8 +166,8 @@ d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
char *v; char *v;
/* get the name */ /* get the name */
if ((v = xs_dict_get(actor, "name")) == NULL || *v == '\0') { if (xs_is_null((v = xs_dict_get(actor, "name"))) || *v == '\0') {
if ((v = xs_dict_get(actor, "preferredUsername")) == NULL) { if (xs_is_null(v = xs_dict_get(actor, "preferredUsername"))) {
v = "user"; v = "user";
} }
} }