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,
|
||||
newswireVotesThreshold: int,
|
||||
newsInstance: bool,
|
||||
blogsInstance: bool,
|
||||
mediaInstance: bool,
|
||||
|
@ -11466,6 +11467,9 @@ def runDaemon(positiveVoting: bool,
|
|||
# on the newswire, whether moderators vote positively for items
|
||||
# or against them (veto)
|
||||
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':
|
||||
httpd.registration = True
|
||||
|
|
|
@ -256,6 +256,10 @@ parser.add_argument('--archiveweeks', dest='archiveWeeks', type=str,
|
|||
parser.add_argument('--maxposts', dest='archiveMaxPosts', type=str,
|
||||
default=None,
|
||||
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,
|
||||
default=None,
|
||||
help='Message content')
|
||||
|
@ -1916,6 +1920,7 @@ if setTheme(baseDir, themeName):
|
|||
|
||||
if __name__ == "__main__":
|
||||
runDaemon(args.positivevoting,
|
||||
args.minimumVotes,
|
||||
args.newsinstance,
|
||||
args.blogsinstance, args.mediainstance,
|
||||
args.maxRecentPosts,
|
||||
|
|
6
tests.py
6
tests.py
|
@ -287,7 +287,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
|||
onionDomain = None
|
||||
i2pDomain = None
|
||||
print('Server running: Alice')
|
||||
runDaemon(False, False, False, False,
|
||||
runDaemon(False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
onionDomain, i2pDomain, None, port, port,
|
||||
|
@ -350,7 +350,7 @@ def createServerBob(path: str, domain: str, port: int,
|
|||
onionDomain = None
|
||||
i2pDomain = None
|
||||
print('Server running: Bob')
|
||||
runDaemon(False, False, False, False,
|
||||
runDaemon(False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
onionDomain, i2pDomain, None, port, port,
|
||||
|
@ -387,7 +387,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
|||
onionDomain = None
|
||||
i2pDomain = None
|
||||
print('Server running: Eve')
|
||||
runDaemon(False, False, False, False,
|
||||
runDaemon(False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
onionDomain, i2pDomain, None, port, port,
|
||||
|
|
Loading…
Reference in New Issue