diff --git a/CHANGELOG.md b/CHANGELOG.md
index e578e4e9..14aae827 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Bugfix: Fixed the channel name input not being focused when opening the select-channel dialog. (#6096)
- Bugfix: Fixed inputs in dialogs not having a border around and padding in them. (#6098)
- Bugfix: Don't set default binding for "Toggle local R9K" on macOS. Was CTRL + H before, which clashes with a system binding. (#5764)
+- Bugfix: Don't add moderation buttons to your own Usercard. (#6107)
- Dev: Temporarily disable precompiled header support for macOS. (#6104)
## 2.5.3-beta.1
diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp
index 6480d5f7..2a828c21 100644
--- a/src/widgets/dialogs/UserInfoPopup.cpp
+++ b/src/widgets/dialogs/UserInfoPopup.cpp
@@ -499,10 +499,20 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, Split *split)
TwitchChannel *twitchChannel = dynamic_cast(
this->underlyingChannel_.get());
- bool hasModRights =
- twitchChannel ? twitchChannel->hasModRights() : false;
- lineMod->setVisible(hasModRights);
- timeout->setVisible(hasModRights);
+ bool visible = false;
+ if (twitchChannel)
+ {
+ bool isMyself =
+ getApp()
+ ->getAccounts()
+ ->twitch.getCurrent()
+ ->getUserName()
+ .compare(this->userName_, Qt::CaseInsensitive) == 0;
+ bool hasModRights = twitchChannel->hasModRights();
+ visible = hasModRights && !isMyself;
+ }
+ lineMod->setVisible(visible);
+ timeout->setVisible(visible);
});
// We can safely ignore this signal connection since we own the button, and
@@ -1041,6 +1051,11 @@ void UserInfoPopup::updateUserData()
this->ui_.block->setEnabled(false);
this->ui_.ignoreHighlights->setEnabled(false);
+ bool isMyself =
+ getApp()->getAccounts()->twitch.getCurrent()->getUserName().compare(
+ this->userName_, Qt::CaseInsensitive) == 0;
+ this->ui_.block->setVisible(!isMyself);
+ this->ui_.ignoreHighlights->setVisible(!isMyself);
}
void UserInfoPopup::loadAvatar(const QUrl &url)