Blob Blame Raw
From e039292195d491ccef283dcb96e911bb72fb9378 Mon Sep 17 00:00:00 2001
From: Miro HronĨok <miro@hroncok.cz>
Date: Jul 02 2019 21:21:26 +0000
Subject: Hotpatch for Bodhi 4


See https://bugzilla.redhat.com/show_bug.cgi?id=1714925

---

diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py
index c1dfb61..b602905 100755
--- a/fedora-easy-karma.py
+++ b/fedora-easy-karma.py
@@ -190,8 +190,6 @@ class FEK_helper(object):
 
                 # the format of the user has changed, add a data member
                 comment["username"] = comment["user"]["name"]
-                if comment["anonymous"]:
-                    comment["username"] += " (unauthenticated)"
 
                 comments.append(
                     "%(indent)s%(username)s - %(timestamp)s "
@@ -222,6 +220,7 @@ class FEK_helper(object):
             values["karma_status"] = "%d/%s" % (values["karma"],
                                                 values["stable_karma"])
 
+        values["submitter"] = values["user"]["name"]
         return format_string % values
 
     @staticmethod
@@ -653,7 +652,7 @@ class FedoraEasyKarma(object):
 
             # Ignore own updates
             if self.options.ignore_own and \
-                    update["submitter"] == self.options.fas_username:
+                    update["user"]["name"] == self.options.fas_username:
                 continue
 
             if update not in processed_updates and \
@@ -773,7 +772,7 @@ class FedoraEasyKarma(object):
 
     def already_commented(self, update, user):
         for comment in update["comments"]:
-            if not comment["anonymous"] and comment["user"]["name"] == user:
+            if comment["user"]["name"] == user:
                 return True
         return False