Snake case

merge-requests/30/head
Bob Mottram 2021-12-26 12:07:40 +00:00
parent a151710ce2
commit 35f3eaa321
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ from utils import getFullDomain
from utils import removeIdEnding from utils import removeIdEnding
from utils import getDomainFromActor from utils import getDomainFromActor
from utils import dangerousMarkup from utils import dangerousMarkup
from utils import isFeaturedWriter from utils import is_featured_writer
from utils import loadJson from utils import loadJson
from utils import saveJson from utils import saveJson
from utils import acct_dir from utils import acct_dir
@ -383,7 +383,7 @@ def postMessageToOutbox(session, translate: {},
# save all instance blogs to the news actor # save all instance blogs to the news actor
if postToNickname != 'news' and outboxName == 'tlblogs': if postToNickname != 'news' and outboxName == 'tlblogs':
if '/' in savedFilename: if '/' in savedFilename:
if isFeaturedWriter(base_dir, postToNickname, domain): if is_featured_writer(base_dir, postToNickname, domain):
savedPostId = savedFilename.split('/')[-1] savedPostId = savedFilename.split('/')[-1]
blogsDir = \ blogsDir = \
base_dir + '/accounts/news@' + domain + '/tlblogs' base_dir + '/accounts/news@' + domain + '/tlblogs'

View File

@ -122,7 +122,7 @@ def acct_dir(base_dir: str, nickname: str, domain: str) -> str:
return base_dir + '/accounts/' + nickname + '@' + domain return base_dir + '/accounts/' + nickname + '@' + domain
def isFeaturedWriter(base_dir: str, nickname: str, domain: str) -> bool: def is_featured_writer(base_dir: str, nickname: str, domain: str) -> bool:
"""Is the given account a featured writer, appearing in the features """Is the given account a featured writer, appearing in the features
timeline on news instances? timeline on news instances?
""" """

View File

@ -18,7 +18,7 @@ from utils import isDormant
from utils import removeHtml from utils import removeHtml
from utils import getDomainFromActor from utils import getDomainFromActor
from utils import getNicknameFromActor from utils import getNicknameFromActor
from utils import isFeaturedWriter from utils import is_featured_writer
from utils import acct_dir from utils import acct_dir
from blocking import isBlocked from blocking import isBlocked
from follow import isFollowerOfPerson from follow import isFollowerOfPerson
@ -342,7 +342,7 @@ def htmlPersonOptions(defaultTimeline: str,
'\n <button type="submit" class="buttonsmall" ' + \ '\n <button type="submit" class="buttonsmall" ' + \
'name="submitPostToFeatures">' + \ 'name="submitPostToFeatures">' + \
translate['Submit'] + '</button><br>\n' translate['Submit'] + '</button><br>\n'
if not isFeaturedWriter(base_dir, optionsNickname, if not is_featured_writer(base_dir, optionsNickname,
optionsDomain): optionsDomain):
checkboxStr = checkboxStr.replace(' checked>', '>') checkboxStr = checkboxStr.replace(' checked>', '>')
optionsStr += checkboxStr optionsStr += checkboxStr