mirror of https://gitlab.com/bashrc2/epicyon
Like post from the notification client
parent
4adc5b40bb
commit
8c1e3bca21
|
@ -17,6 +17,7 @@ from speaker import getSpeakerFromServer
|
|||
from speaker import getSpeakerPitch
|
||||
from speaker import getSpeakerRate
|
||||
from speaker import getSpeakerRange
|
||||
from like import sendLikeViaServer
|
||||
|
||||
|
||||
def _waitForKeypress(timeout: int, debug: bool) -> str:
|
||||
|
@ -187,6 +188,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
nameStr = None
|
||||
gender = None
|
||||
messageStr = None
|
||||
cachedWebfingers = {}
|
||||
personCache = {}
|
||||
while (1):
|
||||
session = createSession(proxyType)
|
||||
speakerJson = \
|
||||
|
@ -305,6 +308,17 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
systemLanguage, espeak)
|
||||
keyPress = _waitForKeypress(2, debug)
|
||||
break
|
||||
elif keyPress == 'like':
|
||||
if nameStr and gender and messageStr:
|
||||
_sayCommand('Liking post by ' + nameStr,
|
||||
screenreader,
|
||||
systemLanguage, espeak)
|
||||
sendLikeViaServer(baseDir, session,
|
||||
nickname, password,
|
||||
domain, port,
|
||||
httpPrefix, speakerJson['id'],
|
||||
cachedWebfingers, personCache,
|
||||
True, __version__)
|
||||
elif keyPress == 'repeat' or keyPress == 'rp':
|
||||
if nameStr and gender and messageStr:
|
||||
_sayCommand('Repeating ' + nameStr, screenreader,
|
||||
|
|
Loading…
Reference in New Issue