Check start of media type

merge-requests/6/head
Bob Mottram 2019-12-03 23:38:36 +00:00
parent 54eb574a7d
commit 33962fc0bf
2 changed files with 1 additions and 3 deletions

View File

@ -313,8 +313,6 @@ if args.tests:
runAllTests()
sys.exit()
args.blurhash=True
if args.testsnetwork:
print('Network Tests')
testPostMessageBetweenServers()

View File

@ -118,7 +118,7 @@ def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \
'type': 'Document',
'url': httpPrefix+'://'+domain+'/'+mediaPath
}
if useBlurhash and mediaType=='image':
if useBlurhash and mediaType.startswith('image/'):
attachmentJson['blurhash']=getImageHash(imageFilename)
postJson['attachment']=[attachmentJson]