Set news avatar for theme

main
Bob Mottram 2020-10-13 22:43:16 +01:00
parent d25be97de0
commit fd86985a09
2 changed files with 10 additions and 10 deletions

View File

@ -12090,6 +12090,16 @@ def runDaemon(showPublishedDateOnly: bool,
print('Creating news inbox: news@' + domain) print('Creating news inbox: news@' + domain)
createNewsInbox(baseDir, domain, port, httpPrefix) createNewsInbox(baseDir, domain, port, httpPrefix)
# set the avatar for the news account
themeName = getConfigParam(baseDir, 'theme')
if not themeName:
themeName = 'default'
setNewsAvatar(baseDir,
themeName,
httpPrefix,
domain,
httpd.domainFull)
if not os.path.isdir(baseDir + '/cache'): if not os.path.isdir(baseDir + '/cache'):
os.mkdir(baseDir + '/cache') os.mkdir(baseDir + '/cache')
if not os.path.isdir(baseDir + '/cache/actors'): if not os.path.isdir(baseDir + '/cache/actors'):

View File

@ -69,7 +69,6 @@ from shares import sendShareViaServer
from shares import sendUndoShareViaServer from shares import sendUndoShareViaServer
from shares import addShare from shares import addShare
from theme import setTheme from theme import setTheme
from theme import setNewsAvatar
from announce import sendAnnounceViaServer from announce import sendAnnounceViaServer
from socnet import instancesGraph from socnet import instancesGraph
import argparse import argparse
@ -1938,15 +1937,6 @@ if YTDomain:
if setTheme(baseDir, themeName, domain): if setTheme(baseDir, themeName, domain):
print('Theme set to ' + themeName) print('Theme set to ' + themeName)
domainFull = domain
if port != 80 and port != 443:
domainFull = domain + ':' + str(port)
setNewsAvatar(baseDir,
themeName,
httpPrefix,
domain,
domainFull)
if __name__ == "__main__": if __name__ == "__main__":
runDaemon(args.dateonly, runDaemon(args.dateonly,
args.votingtime, args.votingtime,