dm on person options screen

master
Bob Mottram 2019-08-25 11:30:39 +01:00
parent 38bba4eeae
commit 907c75e33f
2 changed files with 10 additions and 0 deletions

View File

@ -2669,6 +2669,15 @@ class PubServer(BaseHTTPRequestHandler):
self.wfile.write(msg)
self.server.POSTbusy=False
return
if '&submitDM=' in optionsConfirmParams:
if self.server.debug:
print('Sending DM to '+optionsActor)
reportPath=self.path.replace('/personoptions','')+'/newdm'
msg=htmlNewPost(self.server.baseDir,reportPath,None,[optionsActor],postUrl).encode()
self._set_headers('text/html',len(msg),cookie)
self.wfile.write(msg)
self.server.POSTbusy=False
return
if '&submitReport=' in optionsConfirmParams:
if self.server.debug:
print('Reporting '+optionsActor)

View File

@ -1635,6 +1635,7 @@ def htmlPersonOptions(baseDir: str,domain: str,originPathStr: str,optionsActor:
' <button type="submit" class="button" name="submitView">View</button>' \
' <button type="submit" class="button" name="submit'+followStr+'">'+followStr+'</button>' \
' <button type="submit" class="button" name="submit'+blockStr+'">'+blockStr+'</button>' \
' <button type="submit" class="button" name="submitDM">DM</button>' \
' <button type="submit" class="button" name="submitReport">Report</button>' \
' </form>'
optionsStr+='</center>'