Use of blurhash is optional

merge-requests/6/head
Bob Mottram 2019-12-04 11:11:18 +00:00
parent 169ce16da3
commit 486619e05f
3 changed files with 21 additions and 11 deletions

View File

@ -3605,7 +3605,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.httpPrefix, \
fields['message'],False,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
fields['replyTo'],fields['replyTo'], \
fields['subject'], \
fields['eventDate'],fields['eventTime'], \
@ -3630,7 +3631,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.httpPrefix, \
fields['message'],False,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
fields['replyTo'], fields['replyTo'], \
fields['subject'], \
fields['eventDate'],fields['eventTime'], \
@ -3655,7 +3657,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.httpPrefix, \
fields['message'],True,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
fields['replyTo'], fields['replyTo'], \
fields['subject'], \
fields['eventDate'],fields['eventTime'], \
@ -3682,7 +3685,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.httpPrefix, \
fields['message'],True,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
fields['replyTo'],fields['replyTo'], \
fields['subject'], \
self.server.debug, \
@ -3718,7 +3722,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.httpPrefix, \
fields['message'],True,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
self.server.debug,fields['subject'])
if messageJson:
self.postToNickname=nickname
@ -3746,7 +3751,8 @@ class PubServer(BaseHTTPRequestHandler):
fields['message'],qOptions, \
False,False,False, \
filename,attachmentMediaType, \
fields['imageDescription'],True, \
fields['imageDescription'], \
self.server.useBlurHash, \
fields['subject'],int(fields['duration']))
if messageJson:
self.postToNickname=nickname
@ -5430,7 +5436,8 @@ def runDaemon(mediaInstance: bool,maxRecentPosts: int, \
useTor=False,maxReplies=64, \
domainMaxPostsPerDay=8640,accountMaxPostsPerDay=8640, \
allowDeletion=False,debug=False,unitTest=False, \
instanceOnlySkillsSearch=False,sendThreads=[]) -> None:
instanceOnlySkillsSearch=False,sendThreads=[], \
useBlurHash=False) -> None:
if len(domain)==0:
domain='localhost'
if '.' not in domain:
@ -5444,6 +5451,7 @@ def runDaemon(mediaInstance: bool,maxRecentPosts: int, \
else:
httpd = ThreadingHTTPServer(serverAddress, PubServer)
httpd.useBlurHash=useBlurHash
httpd.mediaInstance=mediaInstance
httpd.defaultTimeline='inbox'
if mediaInstance:

View File

@ -1506,4 +1506,5 @@ runDaemon(args.mediainstance,args.maxRecentPosts, \
useTor,args.maxReplies, \
args.domainMaxPostsPerDay,args.accountMaxPostsPerDay, \
args.allowdeletion,debug,False, \
args.instanceOnlySkillsSearch)
args.instanceOnlySkillsSearch,[], \
args.blurhash)

View File

@ -239,7 +239,7 @@ def createServerAlice(path: str,domain: str,port: int,federationList: [], \
noreply,nolike,nopics,noannounce,cw,ocapAlways, \
useTor,maxReplies, \
domainMaxPostsPerDay,accountMaxPostsPerDay, \
allowDeletion,True,True,False,sendThreads)
allowDeletion,True,True,False,sendThreads,False)
def createServerBob(path: str,domain: str,port: int,federationList: [], \
hasFollows: bool,hasPosts :bool,ocapAlways :bool,sendThreads: []):
@ -295,7 +295,7 @@ def createServerBob(path: str,domain: str,port: int,federationList: [], \
noreply,nolike,nopics,noannounce,cw,ocapAlways, \
useTor,maxReplies, \
domainMaxPostsPerDay,accountMaxPostsPerDay, \
allowDeletion,True,True,False,sendThreads)
allowDeletion,True,True,False,sendThreads,False)
def createServerEve(path: str,domain: str,port: int,federationList: [], \
hasFollows: bool,hasPosts :bool,ocapAlways :bool,sendThreads: []):
@ -329,7 +329,8 @@ def createServerEve(path: str,domain: str,port: int,federationList: [], \
"instanceId",False,path,domain,port,port, \
httpPrefix,federationList,maxMentions,maxEmoji,False, \
noreply,nolike,nopics,noannounce,cw,ocapAlways, \
useTor,maxReplies,allowDeletion,True,True,False,sendThreads)
useTor,maxReplies,allowDeletion,True,True,False, \
sendThreads,False)
def testPostMessageBetweenServers():
print('Testing sending message from one server to the inbox of another')