mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
bugfix for blocked phrases
This commit is contained in:
parent
e85a0ddd9a
commit
f9c9991370
1 changed files with 8 additions and 1 deletions
|
@ -557,7 +557,14 @@ def blocked_users(user_id) -> List[int]:
|
|||
def blocked_phrases() -> List[str]:
|
||||
site = Site.query.get(1)
|
||||
if site.blocked_phrases:
|
||||
return [phrase for phrase in site.blocked_phrases.split('\n') if phrase != '']
|
||||
blocked_phrases = []
|
||||
for phrase in site.blocked_phrases.split('\n'):
|
||||
if phrase != '':
|
||||
if phrase.endswith('\r'):
|
||||
blocked_phrases.append(phrase[:-1])
|
||||
else:
|
||||
blocked_phrases.append(phrase)
|
||||
return blocked_phrases
|
||||
else:
|
||||
return []
|
||||
|
||||
|
|
Loading…
Reference in a new issue