Create separate session for commands

merge-requests/21/head
Bob Mottram 2021-03-10 16:56:27 +00:00
parent ce3f21f9b1
commit 385a793c22
1 changed files with 8 additions and 4 deletions

View File

@ -318,7 +318,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
_sayCommand('Liking post by ' + nameStr, _sayCommand('Liking post by ' + nameStr,
screenreader, screenreader,
systemLanguage, espeak) systemLanguage, espeak)
sendLikeViaServer(baseDir, session, sessionLike = createSession(proxyType)
sendLikeViaServer(baseDir, sessionLike,
nickname, password, nickname, password,
domain, port, domain, port,
httpPrefix, speakerJson['id'], httpPrefix, speakerJson['id'],
@ -330,7 +331,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
_sayCommand('Undoing like of post by ' + nameStr, _sayCommand('Undoing like of post by ' + nameStr,
screenreader, screenreader,
systemLanguage, espeak) systemLanguage, espeak)
sendUndoLikeViaServer(baseDir, session, sessionUnlike = createSession(proxyType)
sendUndoLikeViaServer(baseDir, sessionUnlike,
nickname, password, nickname, password,
domain, port, domain, port,
httpPrefix, speakerJson['id'], httpPrefix, speakerJson['id'],
@ -349,7 +351,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
_sayCommand('Sending follow request to ' + _sayCommand('Sending follow request to ' +
followNickname + '@' + followDomain, followNickname + '@' + followDomain,
screenreader, systemLanguage, espeak) screenreader, systemLanguage, espeak)
sendFollowRequestViaServer(baseDir, session, sessionFollow = createSession(proxyType)
sendFollowRequestViaServer(baseDir, sessionFollow,
nickname, password, nickname, password,
domain, port, domain, port,
followNickname, followNickname,
@ -377,7 +380,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
_sayCommand('Stop following ' + _sayCommand('Stop following ' +
followNickname + '@' + followDomain, followNickname + '@' + followDomain,
screenreader, systemLanguage, espeak) screenreader, systemLanguage, espeak)
sendUnfollowRequestViaServer(baseDir, session, sessionUnfollow = createSession(proxyType)
sendUnfollowRequestViaServer(baseDir, sessionUnfollow,
nickname, password, nickname, password,
domain, port, domain, port,
followNickname, followNickname,