forked from indymedia/epicyon
DM timeline
parent
88a320603b
commit
348df00736
37
daemon.py
37
daemon.py
|
@ -76,6 +76,7 @@ from roles import setRole
|
|||
from roles import clearModeratorStatus
|
||||
from skills import outboxSkills
|
||||
from availability import outboxAvailability
|
||||
from webinterface import htmlInboxDMs
|
||||
from webinterface import htmlUnblockConfirm
|
||||
from webinterface import htmlPersonOptions
|
||||
from webinterface import htmlIndividualPost
|
||||
|
@ -1383,12 +1384,12 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if '/users/' in self.path:
|
||||
if authorized:
|
||||
inboxDMFeed=personBoxJson(self.server.baseDir, \
|
||||
self.server.domain, \
|
||||
self.server.port, \
|
||||
self.path, \
|
||||
self.server.httpPrefix, \
|
||||
maxPostsInFeed, 'dm', \
|
||||
True,self.server.ocapAlways)
|
||||
self.server.domain, \
|
||||
self.server.port, \
|
||||
self.path, \
|
||||
self.server.httpPrefix, \
|
||||
maxPostsInFeed, 'dm', \
|
||||
True,self.server.ocapAlways)
|
||||
if inboxDMFeed:
|
||||
if self._requestHTTP():
|
||||
nickname=self.path.replace('/users/','').replace('/dm','')
|
||||
|
@ -1409,18 +1410,18 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.httpPrefix, \
|
||||
maxPostsInFeed, 'dm', \
|
||||
True,self.server.ocapAlways)
|
||||
msg=htmlInbox(pageNumber,maxPostsInFeed, \
|
||||
self.server.session, \
|
||||
self.server.baseDir, \
|
||||
self.server.cachedWebfingers, \
|
||||
self.server.personCache, \
|
||||
nickname, \
|
||||
self.server.domain, \
|
||||
self.server.port, \
|
||||
inboxDMFeed, \
|
||||
self.server.allowDeletion, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.projectVersion).encode('utf-8')
|
||||
msg=htmlInboxDMs(pageNumber,maxPostsInFeed, \
|
||||
self.server.session, \
|
||||
self.server.baseDir, \
|
||||
self.server.cachedWebfingers, \
|
||||
self.server.personCache, \
|
||||
nickname, \
|
||||
self.server.domain, \
|
||||
self.server.port, \
|
||||
inboxDMFeed, \
|
||||
self.server.allowDeletion, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.projectVersion).encode('utf-8')
|
||||
self._set_headers('text/html',len(msg),cookie)
|
||||
self.wfile.write(msg)
|
||||
else:
|
||||
|
|
|
@ -1467,6 +1467,17 @@ def htmlInbox(pageNumber: int,itemsPerPage: int, \
|
|||
nickname,domain,port,inboxJson,'inbox',allowDeletion, \
|
||||
httpPrefix,projectVersion)
|
||||
|
||||
def htmlInboxDMs(pageNumber: int,itemsPerPage: int, \
|
||||
session,baseDir: str,wfRequest: {},personCache: {}, \
|
||||
nickname: str,domain: str,port: int,inboxJson: {}, \
|
||||
allowDeletion: bool, \
|
||||
httpPrefix: str,projectVersion: str) -> str:
|
||||
"""Show the DM timeline as html
|
||||
"""
|
||||
return htmlTimeline(pageNumber,itemsPerPage,session,baseDir,wfRequest,personCache, \
|
||||
nickname,domain,port,inboxJson,'dm',allowDeletion, \
|
||||
httpPrefix,projectVersion)
|
||||
|
||||
def htmlModeration(pageNumber: int,itemsPerPage: int, \
|
||||
session,baseDir: str,wfRequest: {},personCache: {}, \
|
||||
nickname: str,domain: str,port: int,inboxJson: {}, \
|
||||
|
|
Loading…
Reference in New Issue