commit 4f7a138

default  ·  2024-01-11 18:29:09 +0000 UTC
parent 4a0cef0
Better checking for CC creation in msg_note().
1 files changed,  +2, -2
+2, -2
 1@@ -1273,8 +1273,8 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
 2         if (xs_type(v) == XSTYPE_DICT) {
 3             char *t;
 4 
 5-            if ((t = xs_dict_get(v, "type")) != NULL && strcmp(t, "Mention") == 0) {
 6-                if ((t = xs_dict_get(v, "href")) != NULL)
 7+            if (!xs_is_null(t = xs_dict_get(v, "type")) && strcmp(t, "Mention") == 0) {
 8+                if (!xs_is_null(t = xs_dict_get(v, "href")))
 9                     cc = xs_list_append(cc, t);
10             }
11         }