From afe47437e4917a1f352d38df06c0809981d0c49c Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 2 Jun 2024 11:41:50 -0700 Subject: [PATCH] Disallow blocking your own domain --- Tusker/Screens/Utilities/Previewing.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Utilities/Previewing.swift b/Tusker/Screens/Utilities/Previewing.swift index 76d4dc4d..32d1cadd 100644 --- a/Tusker/Screens/Utilities/Previewing.swift +++ b/Tusker/Screens/Utilities/Previewing.swift @@ -561,7 +561,8 @@ extension MenuActionProvider { UIAction(title: "Cancel", handler: { _ in }), UIAction(title: "Block \(displayName)", image: image, attributes: .destructive, handler: handler(true)), ] - if mastodonController.instanceFeatures.blockDomains { + if mastodonController.instanceFeatures.blockDomains, + host != mastodonController.account?.url.host { children.append(UIAction(title: "Block \(host)", image: image, attributes: .destructive, handler: domainHandler(true))) } return UIMenu(title: "Block", image: image, children: children)