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): def do_HEAD(self):
self._set_headers('application/json',0,None) 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 # 0 = this is not a new post
# 1 = new post success # 1 = new post success
# -1 = new post failed # -1 = new post failed

View File

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