Add LOCALECHO client option for clients not supporting local echoing. Resolve #2258.

This commit is contained in:
Griatch 2021-10-09 00:36:17 +02:00
parent 49886dbff3
commit a7b99a605b
5 changed files with 12 additions and 2 deletions

View file

@ -441,6 +441,10 @@ class PortalSessionHandler(SessionHandler):
session.cmd_last = now
self.portal.amp_protocol.send_MsgPortal2Server(session, **kwargs)
# eventual local echo (text input only)
if 'text' in kwargs and session.protocol_flags.get('LOCALECHO', False):
self.data_out(session, text=kwargs['text'])
def data_out(self, session, **kwargs):
"""
Called by server for having the portal relay messages and data