diff --git a/source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs b/source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs index 7760ba95..517b11a3 100644 --- a/source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs +++ b/source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs @@ -357,8 +357,6 @@ public interface ISiteConfig string MastodonAccount { get; set; } - string MastodonEmail { get; set; } - [XmlAnyElement] XmlElement[] anyElements { get; set; } diff --git a/source/DasBlog.Services/ConfigFile/SiteConfig.cs b/source/DasBlog.Services/ConfigFile/SiteConfig.cs index 62365f9e..8c3ab834 100644 --- a/source/DasBlog.Services/ConfigFile/SiteConfig.cs +++ b/source/DasBlog.Services/ConfigFile/SiteConfig.cs @@ -224,6 +224,5 @@ public SiteConfig() { } public string MastodonAccount { get; set; } - public string MastodonEmail { get; set; } } } diff --git a/source/DasBlog.Tests/UnitTests/SiteConfigTest.cs b/source/DasBlog.Tests/UnitTests/SiteConfigTest.cs index 02a49535..49f98d4b 100644 --- a/source/DasBlog.Tests/UnitTests/SiteConfigTest.cs +++ b/source/DasBlog.Tests/UnitTests/SiteConfigTest.cs @@ -170,6 +170,5 @@ public class SiteConfigTest : ISiteConfig public string DefaultSources { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public string MastodonServerUrl { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public string MastodonAccount { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } - public string MastodonEmail { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } } } diff --git a/source/DasBlog.Web.UI/Config/site.Development.config b/source/DasBlog.Web.UI/Config/site.Development.config index edb2b93a..bee2b8fd 100644 --- a/source/DasBlog.Web.UI/Config/site.Development.config +++ b/source/DasBlog.Web.UI/Config/site.Development.config @@ -31,7 +31,6 @@ - 10 50 diff --git a/source/DasBlog.Web.UI/Config/site.config b/source/DasBlog.Web.UI/Config/site.config index a52199b0..cadb5e00 100644 --- a/source/DasBlog.Web.UI/Config/site.config +++ b/source/DasBlog.Web.UI/Config/site.config @@ -31,7 +31,6 @@ - 10 50 diff --git a/source/DasBlog.Web.UI/Controllers/ActivityPubController.cs b/source/DasBlog.Web.UI/Controllers/ActivityPubController.cs index 7e929c12..7957acf5 100644 --- a/source/DasBlog.Web.UI/Controllers/ActivityPubController.cs +++ b/source/DasBlog.Web.UI/Controllers/ActivityPubController.cs @@ -34,19 +34,12 @@ public ActionResult WebFinger(string resource) string authurl = new Uri(new Uri(dasBlogSettings.SiteConfiguration.MastodonServerUrl), "authorize_interaction").AbsoluteUri + "?uri={uri}"; - string email = string.Format("acct:{0}", dasBlogSettings.SiteConfiguration.MastodonEmail); - if (dasBlogSettings.SiteConfiguration.MastodonServerUrl.IsNullOrWhiteSpace() || dasBlogSettings.SiteConfiguration.MastodonAccount.IsNullOrWhiteSpace()) { return NoContent(); } - if(string.Compare(email, resource, StringComparison.InvariantCultureIgnoreCase) != 0) - { - return NotFound(); - } - var results = new Root { subject = string.Format("acct:{0}@{1}", dasBlogSettings.SiteConfiguration.MastodonAccount.Remove(0, 1), new Uri(dasBlogSettings.SiteConfiguration.MastodonServerUrl).Host), diff --git a/source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs b/source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs index 6b9bb453..97a4dde8 100644 --- a/source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs +++ b/source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs @@ -306,12 +306,6 @@ public class SiteViewModel [RegularExpression("(@)((?:[A-Za-z0-9-_]*))")] public string MastodonAccount { get; set; } - [DisplayName("Mastadon Email")] - [Description("")] - [DataType(DataType.EmailAddress, ErrorMessage = "Invalid email format")] - public string MastodonEmail { get; set; } - - public bool EntryTitleAsLink { get; set; } public bool ObfuscateEmail { get; set; } diff --git a/source/DasBlog.Web.UI/Views/Admin/Settings.cshtml b/source/DasBlog.Web.UI/Views/Admin/Settings.cshtml index f569c1d6..4c959a99 100644 --- a/source/DasBlog.Web.UI/Views/Admin/Settings.cshtml +++ b/source/DasBlog.Web.UI/Views/Admin/Settings.cshtml @@ -402,14 +402,6 @@ @Html.ValidationMessageFor(m => m.SiteConfig.MastodonAccount, null, new { @class = "text-danger" }) -
- @Html.LabelFor(m => @Model.SiteConfig.MastodonEmail, null, new { @class = "col-form-label col-sm-2" }) -
- @Html.TextBoxFor(m => @Model.SiteConfig.MastodonEmail, null, new { @class = "form-control sm-10" }) -
- @Html.ValidationMessageFor(m => m.SiteConfig.MastodonEmail, null, new { @class = "text-danger" }) -
-
@Html.LabelFor(m => @Model.MetaConfig.TwitterSite, null, new { @class = "col-form-label col-sm-2" })