main
Bob Mottram 2021-08-01 17:23:32 +01:00
parent 6863d3bf62
commit 9ad912aec5
2 changed files with 8 additions and 14 deletions

View File

@ -205,8 +205,6 @@ def parseUserFeed(session, feedUrl: str, asHeader: {},
pprint(feedJson)
if 'orderedItems' in feedJson:
#for item in feedJson['orderedItems']:
# yield item
return feedJson['orderedItems']
nextUrl = None
@ -226,14 +224,10 @@ def parseUserFeed(session, feedUrl: str, asHeader: {},
projectVersion, httpPrefix,
domain, debug, depth + 1)
if userFeed:
#for item in userFeed:
# yield item
return userFeed
elif isinstance(nextUrl, dict):
userFeed = nextUrl
if userFeed.get('orderedItems'):
#for item in userFeed['orderedItems']:
# yield item
return userFeed['orderedItems']
return None
@ -546,8 +540,7 @@ def _getPosts(session, outboxUrl: str, maxPosts: int,
"plaintext": _cleanHtml(content),
"attachment": attachment,
"mentions": mentions,
"emoji": emoji,
"conversation": conversation
"emoji": emoji
}
i += 1

View File

@ -1475,7 +1475,8 @@ def testGroupFollow():
assert validInboxFilenames(testgroupDir, 'testgroup', testgroupDomain,
aliceDomain, alicePort)
assert 'alice@' + aliceDomain in open(testgroupFollowersFilename).read()
assert '!alice@' + aliceDomain not in open(testgroupFollowersFilename).read()
assert '!alice@' + aliceDomain not in \
open(testgroupFollowersFilename).read()
testgroupWebfingerFilename = \
testgroupDir + '/wfendpoints/testgroup@' + \
@ -1620,7 +1621,7 @@ def testGroupFollow():
print('\n\n*********************************************************')
print('Check that post was relayed from test group to bob')
# bobMessageArrived = False
# bobMessageArrived = False
for i in range(20):
time.sleep(1)
if os.path.isdir(inboxPathBob):
@ -1628,7 +1629,7 @@ def testGroupFollow():
len([name for name in os.listdir(inboxPathBob)
if os.path.isfile(os.path.join(inboxPathBob, name))])
if currPostsBob > startPostsBob:
# bobMessageArrived = True
# bobMessageArrived = True
print('Bob received relayed group post!')
break