From efdcd2eb0f6594760f512ffac35c72319660663e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Jun 2020 10:48:46 +0100 Subject: [PATCH] Add yourself to the dm recipients list --- daemon.py | 9 ++++++--- webinterface.py | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 577b6d9a..e5771be9 100644 --- a/daemon.py +++ b/daemon.py @@ -3377,7 +3377,8 @@ class PubServer(BaseHTTPRequestHandler): replyToList, shareDescription, replyPageNumber, - nickname, self.server.domain).encode('utf-8') + nickname, self.server.domain, + self.server.domainFull).encode('utf-8') if not msg: print('Error replying to ' + inReplyToUrl) self._404() @@ -7687,7 +7688,8 @@ class PubServer(BaseHTTPRequestHandler): [optionsActor], None, pageNumber, chooserNickname, - self.server.domain).encode('utf-8') + self.server.domain, + self.server.domainFull).encode('utf-8') self._set_headers('text/html', len(msg), cookie, callingDomain) self._write(msg) @@ -7754,7 +7756,8 @@ class PubServer(BaseHTTPRequestHandler): reportPath, None, [], postUrl, pageNumber, chooserNickname, - self.server.domain).encode('utf-8') + self.server.domain, + self.server.domainFull).encode('utf-8') self._set_headers('text/html', len(msg), cookie, callingDomain) self._write(msg) diff --git a/webinterface.py b/webinterface.py index 4eea3fd3..e9174feb 100644 --- a/webinterface.py +++ b/webinterface.py @@ -316,7 +316,8 @@ def htmlFollowingList(baseDir: str, followingFilename: str) -> str: return '' -def htmlFollowingDataList(baseDir: str, nickname: str, domain: str) -> str: +def htmlFollowingDataList(baseDir: str, nickname: str, + domain: str, domainFull: str) -> str: """Returns a datalist of handles being followed """ listStr = '\n' @@ -325,6 +326,7 @@ def htmlFollowingDataList(baseDir: str, nickname: str, domain: str) -> str: if os.path.isfile(followingFilename): with open(followingFilename, 'r') as followingFile: msg = followingFile.read() + msg += nickname + '@' + domainFull + '\n' followingList = msg.split('\n') followingList.sort() if followingList: @@ -1735,7 +1737,8 @@ def htmlNewPost(mediaInstance: bool, translate: {}, path: str, inReplyTo: str, mentions: [], reportUrl: str, pageNumber: int, - nickname: str, domain: str) -> str: + nickname: str, domain: str, + domainFull: str) -> str: """New post screen """ iconsDir = getIconsDir(baseDir) @@ -2144,7 +2147,8 @@ def htmlNewPost(mediaInstance: bool, translate: {}, newPostForm += \ ' \n' - newPostForm += htmlFollowingDataList(baseDir, nickname, domain) + newPostForm += \ + htmlFollowingDataList(baseDir, nickname, domain, domainFull) newPostForm += '' selectedStr = ''