Change ingoing message path to reroute through serversession.data_in before calling the inputfuncs. This allows users to view all incoming data in one place if they want to do eventual pre-processing. Resolves #1163.

This commit is contained in:
Griatch 2017-01-14 12:28:07 +01:00
parent 44bd403cc8
commit a403cc9576
2 changed files with 33 additions and 4 deletions

View file

@ -691,7 +691,22 @@ class ServerSessionHandler(SessionHandler):
def data_in(self, session, **kwargs):
"""
Data Portal -> Server.
We let the data take a "detour" to session.data_in
so the user can override and see it all in one place.
That method is responsible to in turn always call
this class' `sessionhandler.call_inputfunc` with the
(possibly processed) data.
"""
if session:
session.data_in(**kwargs)
def call_inputfuncs(self, session, **kwargs):
"""
Split incoming data into its inputfunc counterparts.
This should be called by the serversession.data_in
as sessionhandler.call_inputfunc(self, **kwargs).
We also intercept OOB communication here.
Args: