Alternative dm commands

main
Bob Mottram 2021-03-11 12:53:00 +00:00
parent 88918d960e
commit 40bc86d88a
1 changed files with 9 additions and 1 deletions

View File

@ -535,10 +535,14 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
print('') print('')
elif (keyPress == 'post' or keyPress == 'p' or elif (keyPress == 'post' or keyPress == 'p' or
keyPress == 'send' or keyPress == 'send' or
keyPress.startswith('dm ') or
keyPress.startswith('direct message ') or
keyPress.startswith('post ') or keyPress.startswith('post ') or
keyPress.startswith('send ')): keyPress.startswith('send ')):
sessionPost = createSession(proxyType) sessionPost = createSession(proxyType)
if keyPress.startswith('post ') or \ if keyPress.startswith('dm ') or \
keyPress.startswith('direct message ') or \
keyPress.startswith('post ') or \
keyPress.startswith('send '): keyPress.startswith('send '):
keyPress = keyPress.replace(' to ', ' ') keyPress = keyPress.replace(' to ', ' ')
# direct message # direct message
@ -547,6 +551,10 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
toHandle = keyPress.split('post ', 1)[1] toHandle = keyPress.split('post ', 1)[1]
elif keyPress.startswith('send '): elif keyPress.startswith('send '):
toHandle = keyPress.split('send ', 1)[1] toHandle = keyPress.split('send ', 1)[1]
elif keyPress.startswith('dm '):
toHandle = keyPress.split('dm ', 1)[1]
elif keyPress.startswith('direct message '):
toHandle = keyPress.split('direct message ', 1)[1]
if toHandle: if toHandle:
_notificationNewDM(sessionPost, toHandle, _notificationNewDM(sessionPost, toHandle,
baseDir, nickname, password, baseDir, nickname, password,