Kaynağa Gözat

Some implementations set quoted posts with 'quoteUrl', so look at that as well.

grunfink 8 ay önce
ebeveyn
işleme
bc74642315
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 2 1
      activitypub.c
  2. 2 1
      html.c

+ 2 - 1
activitypub.c

@@ -2686,7 +2686,8 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
 
 
                 timeline_request(snac, &in_reply_to, &wrk, 0);
                 timeline_request(snac, &in_reply_to, &wrk, 0);
 
 
-                const char *quoted_id = xs_dict_get(object, "quoteUri");
+                const char *quoted_id = xs_or(xs_dict_get(object, "quoteUri"), xs_dict_get(object, "quoteUrl"));
+
                 if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
                 if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
                     xs *quoted_post = NULL;
                     xs *quoted_post = NULL;
                     int status;
                     int status;

+ 2 - 1
html.c

@@ -2396,7 +2396,8 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
             xs_html_raw(c));
             xs_html_raw(c));
 
 
         /* quoted post */
         /* quoted post */
-        const char *quoted_id = xs_dict_get(msg, "quoteUri");
+        const char *quoted_id = xs_or(xs_dict_get(msg, "quoteUri"), xs_dict_get(msg, "quoteUrl"));
+
         if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
         if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
             xs *quoted_post = NULL;
             xs *quoted_post = NULL;