Skip to content

Commit

Permalink
Moderation 2025-01-07
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis committed Jan 7, 2025
1 parent 8069f0b commit f9204e6
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 62 deletions.
2 changes: 2 additions & 0 deletions antiabuse/antispam/urldetector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
'discordapp.com',
'instagram.com',
'onlyfans.com',
'paypal.com',
'paypal.me',
'throne.com',
'twitch.tv',
}
Expand Down
34 changes: 20 additions & 14 deletions antiabuse/normalize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,52 @@
"a[s5$]{2}": "ass",
"b": "be",
"btch": "bitch",
"c+[uv]+m+": "cum",
"c+[uv]+m+s+": "cums",
"c0ck": "cock",
"c0cksucker": "cocksucker",
"cok": "cock",
"c+[uv]+m+": "cum",
"c+[uv]+m+s+": "cums",
"cvmming": "cumming",
"cvmshot": "cumshot",
"ejakulate": "ejaculate",
"fcked": "fucked",
"fck": "fuck",
"fcked": "fucked",
"fcking": "fucking",
"fked": "fucked",
"fk": "fuck",
"fked": "fucked",
"fking": "fucking",
"fuckin": "fucking",
"fuked": "fucked",
"fuk": "fuck",
"fuked": "fucked",
"fuking": "fucking",
"fvcked": "fucked",
"fvck": "fuck",
"fvcked": "fucked",
"fvcking": "fucking",
"h[@a4]rm": "harm",
"l0li": "loli",
"l0licon": "lolicon",
"ngger": "nigger",
"nggr": "nigger",
"nigge": "nigger",
"nigg": "nigger",
"nigge": "nigger",
"p0rn": "porn",
"p[e3]d[o0]": "pedo",
"pissin": "pissing",
"r[a4]p[e3]-?able": "rapeable",
"r[a4]p[e3]": "rape",
"r": "are",
"r[@a4]p[e3]": "rape",
"r[@a4]p[e3]-?able": "rapeable",
"raype": "rape",
"s[e3]lf": "self",
"sxy": "sexy",
"un-?r[a4]p[e3]-?able": "unrapeable",
"un-?r[a4]p[e3]": "unrape",
"urself": "yourself",
"ur": "your",
"tr[@a4]nnies": "trannies",
"tr[@a4]nny": "tranny",
"u": "you",
"wh0res": "whores",
"un-?r[@a4]p[e3]": "unrape",
"un-?r[@a4]p[e3]-?able": "unrapeable",
"ur": "your",
"urself": "yourself",
"wh0re": "whore",
"wh0res": "whores",
}


Expand Down
8 changes: 8 additions & 0 deletions antiabuse/normalize/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def test_normalize_string(self):

self.assertEqual(normalize_string("r4p3"), "rape")

self.assertEqual(normalize_string("raype"), "rape")

self.assertEqual(normalize_string("a55"), "ass")

self.assertEqual(normalize_string("𝖓𝖎𝖌𝖌𝖊𝖗"), "nigger")
Expand All @@ -18,6 +20,12 @@ def test_normalize_string(self):

self.assertEqual(normalize_string("unr4pe-able"), "unrapeable")

self.assertEqual(normalize_string("s3lf h4rm"), "self harm")

self.assertEqual(normalize_string("tr@nnies"), "trannies")

self.assertEqual(normalize_string("tr@nny"), "tranny")


if __name__ == '__main__':
unittest.main()
2 changes: 1 addition & 1 deletion service/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

class IntroRateLimit(Enum):
NONE = 0
UNVERIFIED = 20
UNVERIFIED = 15
BASICS = 40
PHOTOS = 100

Expand Down
48 changes: 15 additions & 33 deletions service/search/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
coordinates,
personality,
gender_id,
verification_level_id,
COALESCE(
(
SELECT
Expand Down Expand Up @@ -531,21 +530,13 @@
500
), do_promote_verified AS (
SELECT
has_minimum_count.x
AND
searcher.verification_level_id > 1 AS x
count(*) >= 250 AS x
FROM
searcher,
(
SELECT
count(*) >= 250 AS x
FROM
prospects_fourth_pass
WHERE
profile_photo_uuid IS NOT NULL
AND
verified
) AS has_minimum_count
prospects_fourth_pass
WHERE
profile_photo_uuid IS NOT NULL
AND
verified
)
INSERT INTO search_cache (
searcher_person_id,
Expand Down Expand Up @@ -706,32 +697,23 @@
Q_QUIZ_SEARCH = """
WITH searcher AS (
SELECT
personality,
verification_level_id
personality
FROM
person
WHERE
person.id = %(searcher_person_id)s
LIMIT 1
), do_promote_verified AS (
SELECT
has_minimum_count.x
AND
searcher.verification_level_id > 1 AS x
count(*) >= 250 AS x
FROM
searcher,
(
SELECT
count(*) >= 250 AS x
FROM
search_cache
WHERE
searcher_person_id = %(searcher_person_id)s
AND
profile_photo_uuid IS NOT NULL
AND
verified
) AS has_minimum_count
search_cache
WHERE
searcher_person_id = %(searcher_person_id)s
AND
profile_photo_uuid IS NOT NULL
AND
verified
), page AS (
SELECT
prospect_person_id,
Expand Down
14 changes: 0 additions & 14 deletions test/functionality1/search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -397,20 +397,6 @@ test_verified_promoted () {

local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")')
[[ "$response" = 'user2 extrauser1 extrauser2 extrauser4 extrauser5' ]]

# If the searcher isn't verified, they don't necessarily see verified members
# first
q "
update
person
set
verification_level_id = 1
where
name = 'searcher'
"

local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")')
[[ "$response" = 'user1 user2 extrauser1 extrauser2 extrauser3' ]]
}

test_quiz_filters () {
Expand Down

0 comments on commit f9204e6

Please sign in to comment.