170cd11f9c
* Add a "Report" link to the footer of forums. * Allow some non-admin users to view a private forum and its threads. * Moderators and approved followers can see it * Note: the endpoint to follow a forum won't let a user invite themselves to a private forum. Currently there is no way to approve a user except by also adding them as a moderator. * Explore and Newest tabs can show these private forums if viewable.
168 lines
4.1 KiB
Go
168 lines
4.1 KiB
Go
package config
|
|
|
|
import "regexp"
|
|
|
|
// Various hard-coded enums such as choice of gender, sexuality, relationship status etc.
|
|
var (
|
|
MaritalStatus = []string{
|
|
"Single",
|
|
"Married",
|
|
"In a relationship",
|
|
"It's complicated",
|
|
"Divorced",
|
|
"Widowed",
|
|
"Widower",
|
|
}
|
|
|
|
RelationshipType = []string{
|
|
"Monogamous",
|
|
"Open",
|
|
}
|
|
|
|
Gender = []string{
|
|
"Man",
|
|
"Woman",
|
|
"Non-binary",
|
|
"Trans",
|
|
"Trans (FTM)",
|
|
"Trans (MTF)",
|
|
"Other",
|
|
}
|
|
|
|
Orientation = []string{
|
|
"Straight",
|
|
"Gay",
|
|
"Bisexual",
|
|
"Bicurious",
|
|
"Pansexual",
|
|
"Asexual",
|
|
}
|
|
|
|
HereFor = []string{
|
|
"Dating", "Relationship", "Platonic friends",
|
|
"Networking", "Casual acquaintances", "Hookups",
|
|
"Chat room", "Forums", "Galleries",
|
|
"Exhibitionism", "Voyeurism", "Couch surfing",
|
|
}
|
|
|
|
// Enums all wrapped up for template use.
|
|
ProfileEnums = map[string][]string{
|
|
"MaritalStatus": MaritalStatus,
|
|
"RelationshipType": RelationshipType,
|
|
"Gender": Gender,
|
|
"Orientation": Orientation,
|
|
"HereFor": HereFor,
|
|
}
|
|
|
|
// Input field names for profile fields.
|
|
ProfileFields = []string{
|
|
"gender",
|
|
"pronouns",
|
|
"city",
|
|
"job",
|
|
"orientation",
|
|
"marital_status",
|
|
"relationship_type",
|
|
"about_me",
|
|
"interests",
|
|
"music_movies",
|
|
"hide_age",
|
|
}
|
|
EssayProfileFields = []string{
|
|
"about_me",
|
|
"interests",
|
|
"music_movies",
|
|
}
|
|
|
|
// Site preference names (stored in ProfileField table)
|
|
SitePreferenceFields = []string{
|
|
"dm_privacy",
|
|
"blur_explicit",
|
|
"site_gallery_default", // default view on site gallery (friends-only or all certified?)
|
|
}
|
|
|
|
// Choices for the Contact Us subject
|
|
ContactUsChoices = []ContactUs{
|
|
{
|
|
Header: "Website Feedback",
|
|
Options: []Option{
|
|
{"feedback", "Website feedback"},
|
|
{"feature", "Make a feature request"},
|
|
{"bug", "Report a bug or broken feature"},
|
|
{"other", "General/miscellaneous/other"},
|
|
},
|
|
},
|
|
{
|
|
Header: "Report a Problem",
|
|
Options: []Option{
|
|
{"report.user", "Report a problematic user"},
|
|
{"report.photo", "Report a problematic photo"},
|
|
{"report.message", "Report a direct message conversation"},
|
|
{"report.comment", "Report a forum post or comment"},
|
|
{"report.forum", "Report a forum or community"},
|
|
},
|
|
},
|
|
}
|
|
|
|
// Default forum categories for forum landing page.
|
|
ForumCategories = []string{
|
|
"Rules and Announcements",
|
|
"Nudists",
|
|
"Exhibitionists",
|
|
"Photo Boards",
|
|
"Anything Goes",
|
|
}
|
|
|
|
// Keywords that appear in a DM that make it likely spam.
|
|
DirectMessageSpamKeywords = []*regexp.Regexp{
|
|
regexp.MustCompile(`\b(telegram|whats\s*app|signal|kik|session)\b`),
|
|
regexp.MustCompile(`https?://(t.me|join.skype.com|zoom.us|whereby.com|meet.jit.si|wa.me)`),
|
|
}
|
|
)
|
|
|
|
// ContactUs choices for the subject drop-down.
|
|
type ContactUs struct {
|
|
Header string
|
|
Options []Option
|
|
}
|
|
|
|
// Option for select boxes.
|
|
type Option struct {
|
|
Value string
|
|
Label string
|
|
}
|
|
|
|
// NotificationOptout field values (stored in user ProfileField table)
|
|
const (
|
|
NotificationOptOutFriendPhotos = "notif_optout_friends_photos"
|
|
NotificationOptOutPrivatePhotos = "notif_optout_private_photos"
|
|
NotificationOptOutExplicitPhotos = "notif_optout_explicit_photos"
|
|
NotificationOptOutLikes = "notif_optout_likes"
|
|
NotificationOptOutComments = "notif_optout_comments"
|
|
NotificationOptOutSubscriptions = "notif_optout_subscriptions"
|
|
NotificationOptOutFriendRequestAccepted = "notif_optout_friend_request_accepted"
|
|
NotificationOptOutPrivateGrant = "notif_optout_private_grant"
|
|
|
|
// Web Push Notifications
|
|
PushNotificationOptOutMessage = "notif_optout_push_messages"
|
|
PushNotificationOptOutFriends = "notif_optout_push_friends"
|
|
)
|
|
|
|
// Notification opt-outs (stored in ProfileField table)
|
|
var NotificationOptOutFields = []string{
|
|
NotificationOptOutFriendPhotos,
|
|
NotificationOptOutPrivatePhotos,
|
|
NotificationOptOutExplicitPhotos,
|
|
NotificationOptOutLikes,
|
|
NotificationOptOutComments,
|
|
NotificationOptOutSubscriptions,
|
|
NotificationOptOutFriendRequestAccepted,
|
|
NotificationOptOutPrivateGrant,
|
|
}
|
|
|
|
// Push Notification opt-outs (stored in ProfileField table)
|
|
var PushNotificationOptOutFields = []string{
|
|
PushNotificationOptOutMessage,
|
|
PushNotificationOptOutFriends,
|
|
}
|