diff --git a/notifications_client.py b/notifications_client.py index a8c5ed03f..c8662d01f 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -24,6 +24,7 @@ from like import sendUndoLikeViaServer from follow import sendFollowRequestViaServer from follow import sendUnfollowRequestViaServer from posts import sendPostViaServer +from announce import sendAnnounceViaServer def _waitForKeypress(timeout: int, debug: bool) -> str: @@ -488,6 +489,23 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, cachedWebfingers, personCache, True, __version__) print('') + elif (keyPress == 'announce' or + keyPress == 'boost' or + keyPress == 'retweet'): + if speakerJson.get('id'): + if nameStr and gender and messageStr: + postId = speakerJson['id'] + _sayCommand('Announcing post by ' + nameStr, + screenreader, + systemLanguage, espeak) + sessionAnnounce = createSession(proxyType) + sendAnnounceViaServer(baseDir, sessionAnnounce, + nickname, password, + domain, port, + httpPrefix, postId, + cachedWebfingers, personCache, + True, __version__) + print('') elif keyPress.startswith('follow '): followHandle = keyPress.replace('follow ', '').strip() if followHandle.startswith('@'): diff --git a/speaker.py b/speaker.py index 2dde36ec2..b74d6a529 100644 --- a/speaker.py +++ b/speaker.py @@ -92,8 +92,12 @@ def _speakerPronounce(baseDir: str, sayText: str, translate: {}) -> str: "Tor": "Toor", "memes": "meemes", "Memes": "Meemes", + "rofl": "roll on the floor laughing", + "ROFL": "roll on the floor laughing", "fwiw": "for what it's worth", "fyi": "for your information", + "irl": "in real life", + "IRL": "in real life", "imho": "in my opinion", "fediverse": "fediiverse", "Fediverse": "Fediiverse",