diff --git a/person.py b/person.py index 3ebb4df0..9e7ec621 100644 --- a/person.py +++ b/person.py @@ -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) diff --git a/posts.py b/posts.py index d3c1c265..37d52382 100644 --- a/posts.py +++ b/posts.py @@ -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