Optional share image

master
Bob Mottram 2019-08-25 22:05:51 +01:00
parent f17ab7d8cc
commit 5d533071c2
2 changed files with 4 additions and 3 deletions

View File

@ -1731,7 +1731,7 @@ class PubServer(BaseHTTPRequestHandler):
def do_HEAD(self):
self._set_headers('application/json',0,None)
def _receiveNewPost(self,authorized: bool,postType: str) -> bool:
def _receiveNewPost(self,authorized: bool,postType: str) -> int:
# 0 = this is not a new post
# 1 = new post success
# -1 = new post failed

View File

@ -791,8 +791,9 @@ def htmlProfileShares(nickname: str,domain: str,sharesJson: {}) -> str:
for item in sharesJson['orderedItems']:
profileStr+='<div class="container">'
profileStr+='<p class="share-title">'+item['displayName']+'</p>'
profileStr+='<a href="'+item['imageUrl']+'">'
profileStr+='<img src="'+item['imageUrl']+'" alt="Item image"></a>'
if item.get('imageUrl'):
profileStr+='<a href="'+item['imageUrl']+'">'
profileStr+='<img src="'+item['imageUrl']+'" alt="Item image"></a>'
profileStr+='<p>'+item['summary']+'</p>'
profileStr+='<p><b>Type:</b> '+item['itemType']+' '
profileStr+='<b>Category:</b> '+item['category']+' '