Only include federated shares if the domains list is not empty

merge-requests/30/head
Bob Mottram 2021-07-27 15:26:48 +01:00
parent 974b97dc87
commit 712f7d9b14
2 changed files with 27 additions and 24 deletions

View File

@ -38,6 +38,8 @@ def _getLeftColumnShares(baseDir: str,
"""
pageNumber = 1
actor = httpPrefix + '://' + domainFull + '/users/' + nickname
# NOTE: this could potentially be slow if the number of federated
# shared items is large
sharesJson, lastPage = \
sharesTimelineJson(actor, pageNumber, maxSharesInLeftColumn,
baseDir, maxSharesInLeftColumn,

View File

@ -362,6 +362,7 @@ def sharesTimelineJson(actor: str, pageNumber: int, itemsPerPage: int,
if ctr >= maxSharesPerAccount:
break
break
if sharedItemsFederatedDomains:
catalogsDir = baseDir + '/cache/catalogs'
if os.path.isdir(catalogsDir):
for subdir, dirs, files in os.walk(catalogsDir):