media timeline

main2
Bob Mottram 2019-09-28 12:40:42 +01:00
parent 7c579e821b
commit 4b3ab2940f
2 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,7 @@ from webfinger import createWebfingerEndpoint
from webfinger import storeWebfingerEndpoint
from posts import createDMTimeline
from posts import createRepliesTimeline
from posts import createMediaTimeline
from posts import createInbox
from posts import createOutbox
from posts import createModeration
@ -401,7 +402,7 @@ def personBoxJson(baseDir: str,domain: str,port: int,path: str, \
"""Obtain the inbox/outbox/moderation feed for the given person
"""
if boxname!='inbox' and boxname!='dm' and \
boxname!='tlreplies' and \
boxname!='tlreplies' and boxname!='tlmedia' and \
boxname!='outbox' and boxname!='moderation':
return None
@ -445,6 +446,9 @@ def personBoxJson(baseDir: str,domain: str,port: int,path: str, \
elif boxname=='tlreplies':
return createRepliesTimeline(baseDir,nickname,domain,port,httpPrefix, \
noOfItems,headerOnly,ocapAlways,pageNumber)
elif boxname=='tlmedia':
return createMediaTimeline(baseDir,nickname,domain,port,httpPrefix, \
noOfItems,headerOnly,ocapAlways,pageNumber)
elif boxname=='outbox':
return createOutbox(baseDir,nickname,domain,port,httpPrefix, \
noOfItems,headerOnly,authorized,pageNumber)

View File

@ -1888,6 +1888,9 @@ def createBoxBase(baseDir: str,boxname: str, \
elif boxname=='tlreplies':
if boxActor not in postStr:
isPost=False
elif boxname=='tlmedia':
if 'image/' not in postStr:
isPost=False
if isPost:
isTimelinePost=False