forked from indymedia/epicyon
Newswire votes threshold
parent
23519bea54
commit
72b5db2d9e
|
@ -11356,6 +11356,7 @@ def loadTokens(baseDir: str, tokensDict: {}, tokensLookup: {}) -> None:
|
||||||
|
|
||||||
|
|
||||||
def runDaemon(positiveVoting: bool,
|
def runDaemon(positiveVoting: bool,
|
||||||
|
newswireVotesThreshold: int,
|
||||||
newsInstance: bool,
|
newsInstance: bool,
|
||||||
blogsInstance: bool,
|
blogsInstance: bool,
|
||||||
mediaInstance: bool,
|
mediaInstance: bool,
|
||||||
|
@ -11466,6 +11467,9 @@ def runDaemon(positiveVoting: bool,
|
||||||
# on the newswire, whether moderators vote positively for items
|
# on the newswire, whether moderators vote positively for items
|
||||||
# or against them (veto)
|
# or against them (veto)
|
||||||
httpd.positiveVoting = positiveVoting
|
httpd.positiveVoting = positiveVoting
|
||||||
|
# number of votes needed to remove a newswire item from the news timeline
|
||||||
|
# or if positive voting is anabled to add the item to the news timeline
|
||||||
|
httpd.newswireVotesThreshold = newswireVotesThreshold
|
||||||
|
|
||||||
if registration == 'open':
|
if registration == 'open':
|
||||||
httpd.registration = True
|
httpd.registration = True
|
||||||
|
|
|
@ -256,6 +256,10 @@ parser.add_argument('--archiveweeks', dest='archiveWeeks', type=str,
|
||||||
parser.add_argument('--maxposts', dest='archiveMaxPosts', type=str,
|
parser.add_argument('--maxposts', dest='archiveMaxPosts', type=str,
|
||||||
default=None,
|
default=None,
|
||||||
help='Maximum number of posts in in/outbox')
|
help='Maximum number of posts in in/outbox')
|
||||||
|
parser.add_argument('--minimumVotes', dest='minimumVotes', type=str,
|
||||||
|
default=None,
|
||||||
|
help='Minimum number of votes to remove or add' +
|
||||||
|
' a newswire item')
|
||||||
parser.add_argument('--message', dest='message', type=str,
|
parser.add_argument('--message', dest='message', type=str,
|
||||||
default=None,
|
default=None,
|
||||||
help='Message content')
|
help='Message content')
|
||||||
|
@ -1916,6 +1920,7 @@ if setTheme(baseDir, themeName):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
runDaemon(args.positivevoting,
|
runDaemon(args.positivevoting,
|
||||||
|
args.minimumVotes,
|
||||||
args.newsinstance,
|
args.newsinstance,
|
||||||
args.blogsinstance, args.mediainstance,
|
args.blogsinstance, args.mediainstance,
|
||||||
args.maxRecentPosts,
|
args.maxRecentPosts,
|
||||||
|
|
6
tests.py
6
tests.py
|
@ -287,7 +287,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Alice')
|
print('Server running: Alice')
|
||||||
runDaemon(False, False, False, False,
|
runDaemon(False, 1, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
@ -350,7 +350,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Bob')
|
print('Server running: Bob')
|
||||||
runDaemon(False, False, False, False,
|
runDaemon(False, 1, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
@ -387,7 +387,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Eve')
|
print('Server running: Eve')
|
||||||
runDaemon(False, False, False, False,
|
runDaemon(False, 1, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
|
Loading…
Reference in New Issue