diff --git a/daemon.py b/daemon.py index 327d2c12..0be1c1f4 100644 --- a/daemon.py +++ b/daemon.py @@ -926,6 +926,7 @@ class PubServer(BaseHTTPRequestHandler): # reply from the web interface icon inReplyToUrl=None + replyWithDM=False replyToList=[] if authorized and '?replyto=' in self.path: inReplyToUrl=self.path.split('?replyto=')[1] @@ -937,6 +938,17 @@ class PubServer(BaseHTTPRequestHandler): inReplyToUrl=mentionsList[0] self.path=self.path.split('?replyto=')[0]+'/newpost' + # replying as a direct message, for moderation posts + if authorized and '?replydm=' in self.path: + inReplyToUrl=self.path.split('?replydm=')[1] + if '?' in inReplyToUrl: + mentionsList=inReplyToUrl.split('?') + for m in mentionsList: + if m.startswith('mention='): + replyToList.append(m.replace('mention=','')) + inReplyToUrl=mentionsList[0] + self.path=self.path.split('?replydm=')[0]+'/newdm' + # edit profile in web interface if '/users/' in self.path and self.path.endswith('/editprofile'): self._set_headers('text/html',cookie) diff --git a/webinterface.py b/webinterface.py index 6d04cc7a..51c2803d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -941,7 +941,10 @@ def individualPostAsHtml(baseDir: str, \ break footerStr='