mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
a151710ce2
commit
35f3eaa321
|
@ -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'
|
||||||
|
|
2
utils.py
2
utils.py
|
@ -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?
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -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,8 +342,8 @@ 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue