added moderation settings

This commit is contained in:
Nicolas Constant 2021-02-03 01:25:47 -05:00
parent 1d8e622ab5
commit f0fce82d27
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688
3 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,10 @@
namespace BirdsiteLive.Common.Settings
{
public class ModerationSettings
{
public string FollowersWhiteListing { get; set; }
public string FollowersBlackListing { get; set; }
public string TwitterAccountsWhiteListing { get; set; }
public string TwitterAccountsBlackListing { get; set; }
}
}

View file

@ -66,7 +66,10 @@ namespace BirdsiteLive
var logsSettings = Configuration.GetSection("Logging").Get<LogsSettings>();
services.For<LogsSettings>().Use(x => logsSettings);
var moderationSettings = Configuration.GetSection("Moderation").Get<ModerationSettings>();
services.For<ModerationSettings>().Use(x => moderationSettings);
if (string.Equals(dbSettings.Type, DbTypes.Postgres, StringComparison.OrdinalIgnoreCase))
{
var connString = $"Host={dbSettings.Host};Username={dbSettings.User};Password={dbSettings.Password};Database={dbSettings.Name}";

View file

@ -10,12 +10,12 @@
},
"AllowedHosts": "*",
"Instance": {
"Name": "BirdsiteLIVE",
"Name": "BirdsiteLIVE",
"Domain": "domain.name",
"AdminEmail": "me@domain.name",
"ResolveMentionsInProfiles": true,
"PublishReplies": false,
"MaxUsersCapacity": 1400
"PublishReplies": false,
"MaxUsersCapacity": 1400
},
"Db": {
"Type": "postgres",
@ -27,5 +27,11 @@
"Twitter": {
"ConsumerKey": "twitter.api.key",
"ConsumerSecret": "twitter.api.key"
},
"Moderation": {
"FollowersWhiteListing": null,
"FollowersBlackListing": null,
"TwitterAccountsWhiteListing": null,
"TwitterAccountsBlackListing": null
}
}