Skip to content

Commit aa9d765

Browse files
authored
Merge pull request #657 from poppastring/remove-webfinger-email
Removed references to Mastodon email.
2 parents c449bac + 1e905b1 commit aa9d765

File tree

8 files changed

+0
-27
lines changed

8 files changed

+0
-27
lines changed

source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs

-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ public interface ISiteConfig
357357

358358
string MastodonAccount { get; set; }
359359

360-
string MastodonEmail { get; set; }
361-
362360
[XmlAnyElement]
363361
XmlElement[] anyElements { get; set; }
364362

source/DasBlog.Services/ConfigFile/SiteConfig.cs

-1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,5 @@ public SiteConfig() { }
224224

225225
public string MastodonAccount { get; set; }
226226

227-
public string MastodonEmail { get; set; }
228227
}
229228
}

source/DasBlog.Tests/UnitTests/SiteConfigTest.cs

-1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,5 @@ public class SiteConfigTest : ISiteConfig
170170
public string DefaultSources { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
171171
public string MastodonServerUrl { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
172172
public string MastodonAccount { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
173-
public string MastodonEmail { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
174173
}
175174
}

source/DasBlog.Web.UI/Config/site.Development.config

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
<MastodonServerUrl />
3333
<MastodonAccount />
34-
<MastodonEmail />
3534

3635
<RssDayCount>10</RssDayCount>
3736
<RssMainEntryCount>50</RssMainEntryCount>

source/DasBlog.Web.UI/Config/site.config

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
<MastodonServerUrl />
3333
<MastodonAccount />
34-
<MastodonEmail />
3534

3635
<RssDayCount>10</RssDayCount>
3736
<RssMainEntryCount>50</RssMainEntryCount>

source/DasBlog.Web.UI/Controllers/ActivityPubController.cs

-7
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,12 @@ public ActionResult WebFinger(string resource)
3434
string authurl = new Uri(new Uri(dasBlogSettings.SiteConfiguration.MastodonServerUrl),
3535
"authorize_interaction").AbsoluteUri + "?uri={uri}";
3636

37-
string email = string.Format("acct:{0}", dasBlogSettings.SiteConfiguration.MastodonEmail);
38-
3937
if (dasBlogSettings.SiteConfiguration.MastodonServerUrl.IsNullOrWhiteSpace() ||
4038
dasBlogSettings.SiteConfiguration.MastodonAccount.IsNullOrWhiteSpace())
4139
{
4240
return NoContent();
4341
}
4442

45-
if(string.Compare(email, resource, StringComparison.InvariantCultureIgnoreCase) != 0)
46-
{
47-
return NotFound();
48-
}
49-
5043
var results = new Root
5144
{
5245
subject = string.Format("acct:{0}@{1}", dasBlogSettings.SiteConfiguration.MastodonAccount.Remove(0, 1), new Uri(dasBlogSettings.SiteConfiguration.MastodonServerUrl).Host),

source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs

-6
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ public class SiteViewModel
306306
[RegularExpression("(@)((?:[A-Za-z0-9-_]*))")]
307307
public string MastodonAccount { get; set; }
308308

309-
[DisplayName("Mastadon Email")]
310-
[Description("")]
311-
[DataType(DataType.EmailAddress, ErrorMessage = "Invalid email format")]
312-
public string MastodonEmail { get; set; }
313-
314-
315309

316310
public bool EntryTitleAsLink { get; set; }
317311
public bool ObfuscateEmail { get; set; }

source/DasBlog.Web.UI/Views/Admin/Settings.cshtml

-8
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,6 @@
402402
@Html.ValidationMessageFor(m => m.SiteConfig.MastodonAccount, null, new { @class = "text-danger" })
403403
</div>
404404

405-
<div class="form-group row mb-3">
406-
@Html.LabelFor(m => @Model.SiteConfig.MastodonEmail, null, new { @class = "col-form-label col-sm-2" })
407-
<div class="col-sm-5">
408-
@Html.TextBoxFor(m => @Model.SiteConfig.MastodonEmail, null, new { @class = "form-control sm-10" })
409-
</div>
410-
@Html.ValidationMessageFor(m => m.SiteConfig.MastodonEmail, null, new { @class = "text-danger" })
411-
</div>
412-
413405
<div class="form-group row mb-3">
414406

415407
@Html.LabelFor(m => @Model.MetaConfig.TwitterSite, null, new { @class = "col-form-label col-sm-2" })

0 commit comments

Comments
 (0)