Răsfoiți Sursa

You can always Boost your own posts indefinitely.

default 3 ani în urmă
părinte
comite
c03c548832
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      html.c

+ 6 - 4
html.c

@@ -409,8 +409,7 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num)
         s = xs_str_cat(s, s1);
         s = xs_str_cat(s, s1);
     }
     }
 
 
-    if (strcmp(actor, snac->actor) != 0) {
-        /* controls for other actors than this one */
+    {
         char *l;
         char *l;
 
 
         l = xs_dict_get(meta, "liked_by");
         l = xs_dict_get(meta, "liked_by");
@@ -420,11 +419,14 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num)
         }
         }
 
 
         l = xs_dict_get(meta, "announced_by");
         l = xs_dict_get(meta, "announced_by");
-        if (xs_list_in(l, snac->actor) == -1) {
-            /* not already boosted; add button */
+        if (strcmp(actor, snac->actor) == 0 || xs_list_in(l, snac->actor) == -1) {
+            /* not already boosted or us; add button */
             s = html_button(s, "boost", L("Boost"));
             s = html_button(s, "boost", L("Boost"));
         }
         }
+    }
 
 
+    if (strcmp(actor, snac->actor) != 0) {
+        /* controls for other actors than this one */
         if (following_check(snac, actor)) {
         if (following_check(snac, actor)) {
             s = html_button(s, "unfollow", L("Unfollow"));
             s = html_button(s, "unfollow", L("Unfollow"));
         }
         }