mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Better checking for CC creation in msg_note().
This commit is contained in:
parent
4a0cef0709
commit
4f7a13884e
@ -1273,8 +1273,8 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
|
|||||||
if (xs_type(v) == XSTYPE_DICT) {
|
if (xs_type(v) == XSTYPE_DICT) {
|
||||||
char *t;
|
char *t;
|
||||||
|
|
||||||
if ((t = xs_dict_get(v, "type")) != NULL && strcmp(t, "Mention") == 0) {
|
if (!xs_is_null(t = xs_dict_get(v, "type")) && strcmp(t, "Mention") == 0) {
|
||||||
if ((t = xs_dict_get(v, "href")) != NULL)
|
if (!xs_is_null(t = xs_dict_get(v, "href")))
|
||||||
cc = xs_list_append(cc, t);
|
cc = xs_list_append(cc, t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user