mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
a08044f4c9
commit
438f06aea9
|
@ -18437,7 +18437,7 @@ def runDaemon(content_license_url: str,
|
|||
icons_as_buttons: bool,
|
||||
full_width_tl_button_header: bool,
|
||||
show_publish_as_icon: bool,
|
||||
maxFollowers: int,
|
||||
max_followers: int,
|
||||
maxNewsPosts: int,
|
||||
maxMirroredArticles: int,
|
||||
maxNewswireFeedSizeKb: int,
|
||||
|
@ -18657,7 +18657,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.maxTags = 32
|
||||
|
||||
# maximum number of followers per account
|
||||
httpd.maxFollowers = maxFollowers
|
||||
httpd.max_followers = max_followers
|
||||
|
||||
# whether to show an icon for publish on the
|
||||
# newswire, or a 'Publish' button
|
||||
|
@ -18918,7 +18918,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.yt_replace_domain,
|
||||
httpd.twitterReplacementDomain,
|
||||
httpd.showPublishedDateOnly,
|
||||
httpd.maxFollowers,
|
||||
httpd.max_followers,
|
||||
httpd.allow_local_network_access,
|
||||
httpd.peertubeInstances,
|
||||
verify_all_signatures,
|
||||
|
|
14
epicyon.py
14
epicyon.py
|
@ -214,8 +214,8 @@ parser.add_argument('--maxNewsPosts',
|
|||
default=0,
|
||||
help='Maximum number of news timeline posts to keep. ' +
|
||||
'Zero for no expiry.')
|
||||
parser.add_argument('--maxFollowers',
|
||||
dest='maxFollowers', type=int,
|
||||
parser.add_argument('--max_followers',
|
||||
dest='max_followers', type=int,
|
||||
default=2000,
|
||||
help='Maximum number of followers per account. ' +
|
||||
'Zero for no limit.')
|
||||
|
@ -3053,10 +3053,10 @@ maxNewsPosts = \
|
|||
if maxNewsPosts is not None:
|
||||
args.maxNewsPosts = int(maxNewsPosts)
|
||||
|
||||
maxFollowers = \
|
||||
getConfigParam(base_dir, 'maxFollowers')
|
||||
if maxFollowers is not None:
|
||||
args.maxFollowers = int(maxFollowers)
|
||||
max_followers = \
|
||||
getConfigParam(base_dir, 'max_followers')
|
||||
if max_followers is not None:
|
||||
args.max_followers = int(max_followers)
|
||||
|
||||
max_feed_item_size_kb = \
|
||||
getConfigParam(base_dir, 'max_feed_item_size_kb')
|
||||
|
@ -3232,7 +3232,7 @@ if __name__ == "__main__":
|
|||
args.icons_as_buttons,
|
||||
args.full_width_tl_button_header,
|
||||
args.show_publish_as_icon,
|
||||
args.maxFollowers,
|
||||
args.max_followers,
|
||||
args.maxNewsPosts,
|
||||
args.maxMirroredArticles,
|
||||
args.maxNewswireFeedSizeKb,
|
||||
|
|
10
inbox.py
10
inbox.py
|
@ -3848,7 +3848,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
messageJson: {}, federationList: [],
|
||||
debug: bool, projectVersion: str,
|
||||
maxFollowers: int, onionDomain: str,
|
||||
max_followers: int, onionDomain: str,
|
||||
signingPrivateKeyPem: str, unitTest: bool) -> bool:
|
||||
"""Receives a follow request within the POST section of HTTPServer
|
||||
"""
|
||||
|
@ -3902,10 +3902,10 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
print('DEBUG: Cannot follow system account - ' +
|
||||
nicknameToFollow)
|
||||
return True
|
||||
if maxFollowers > 0:
|
||||
if max_followers > 0:
|
||||
if getNoOfFollowers(base_dir,
|
||||
nicknameToFollow, domainToFollow,
|
||||
True) > maxFollowers:
|
||||
True) > max_followers:
|
||||
print('WARN: ' + nicknameToFollow +
|
||||
' has reached their maximum number of followers')
|
||||
return True
|
||||
|
@ -4074,7 +4074,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
|||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
showPublishedDateOnly: bool,
|
||||
maxFollowers: int,
|
||||
max_followers: int,
|
||||
allow_local_network_access: bool,
|
||||
peertubeInstances: [],
|
||||
verify_all_signatures: bool,
|
||||
|
@ -4371,7 +4371,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
|||
queueJson['post'],
|
||||
federationList,
|
||||
debug, projectVersion,
|
||||
maxFollowers, onionDomain,
|
||||
max_followers, onionDomain,
|
||||
signingPrivateKeyPem, unitTest):
|
||||
if os.path.isfile(queueFilename):
|
||||
try:
|
||||
|
|
16
tests.py
16
tests.py
|
@ -783,7 +783,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
|||
max_newswire_posts = 20
|
||||
dormant_months = 3
|
||||
send_threads_timeout_mins = 30
|
||||
maxFollowers = 10
|
||||
max_followers = 10
|
||||
verify_all_signatures = True
|
||||
broch_mode = False
|
||||
show_node_info_accounts = True
|
||||
|
@ -809,7 +809,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
|||
send_threads_timeout_mins,
|
||||
dormant_months, max_newswire_posts,
|
||||
allow_local_network_access,
|
||||
2048, False, True, False, False, True, maxFollowers,
|
||||
2048, False, True, False, False, True, max_followers,
|
||||
0, 100, 1024, 5, False,
|
||||
0, False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
|
@ -925,7 +925,7 @@ def createServerBob(path: str, domain: str, port: int,
|
|||
max_newswire_posts = 20
|
||||
dormant_months = 3
|
||||
send_threads_timeout_mins = 30
|
||||
maxFollowers = 10
|
||||
max_followers = 10
|
||||
verify_all_signatures = True
|
||||
broch_mode = False
|
||||
show_node_info_accounts = True
|
||||
|
@ -951,7 +951,7 @@ def createServerBob(path: str, domain: str, port: int,
|
|||
send_threads_timeout_mins,
|
||||
dormant_months, max_newswire_posts,
|
||||
allow_local_network_access,
|
||||
2048, False, True, False, False, True, maxFollowers,
|
||||
2048, False, True, False, False, True, max_followers,
|
||||
0, 100, 1024, 5, False, 0,
|
||||
False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
|
@ -994,7 +994,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
|||
max_newswire_posts = 20
|
||||
dormant_months = 3
|
||||
send_threads_timeout_mins = 30
|
||||
maxFollowers = 10
|
||||
max_followers = 10
|
||||
verify_all_signatures = True
|
||||
broch_mode = False
|
||||
show_node_info_accounts = True
|
||||
|
@ -1021,7 +1021,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
|||
send_threads_timeout_mins,
|
||||
dormant_months, max_newswire_posts,
|
||||
allow_local_network_access,
|
||||
2048, False, True, False, False, True, maxFollowers,
|
||||
2048, False, True, False, False, True, max_followers,
|
||||
0, 100, 1024, 5, False, 0,
|
||||
False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
|
@ -1066,7 +1066,7 @@ def createServerGroup(path: str, domain: str, port: int,
|
|||
max_newswire_posts = 20
|
||||
dormant_months = 3
|
||||
send_threads_timeout_mins = 30
|
||||
maxFollowers = 10
|
||||
max_followers = 10
|
||||
verify_all_signatures = True
|
||||
broch_mode = False
|
||||
show_node_info_accounts = True
|
||||
|
@ -1093,7 +1093,7 @@ def createServerGroup(path: str, domain: str, port: int,
|
|||
send_threads_timeout_mins,
|
||||
dormant_months, max_newswire_posts,
|
||||
allow_local_network_access,
|
||||
2048, False, True, False, False, True, maxFollowers,
|
||||
2048, False, True, False, False, True, max_followers,
|
||||
0, 100, 1024, 5, False,
|
||||
0, False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
|
|
Loading…
Reference in New Issue