瀏覽代碼

In mastoapi, don't show poll votes in timelines.

default 3 年之前
父節點
當前提交
bf6fcee21c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      mastoapi.c

+ 4 - 0
mastoapi.c

@@ -1157,6 +1157,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
                 if (is_hidden(&snac1, xs_dict_get(msg, "id")))
                 if (is_hidden(&snac1, xs_dict_get(msg, "id")))
                     continue;
                     continue;
 
 
+                /* discard poll votes (they have a name) */
+                if (!xs_is_null(xs_dict_get(msg, "name")))
+                    continue;
+
                 /* convert the Note into a Mastodon status */
                 /* convert the Note into a Mastodon status */
                 xs *st = mastoapi_status(&snac1, msg);
                 xs *st = mastoapi_status(&snac1, msg);