def channel_session_user_from_http(func):
 @http_session_user
 @channel_session
 @functools.wraps(func)
 def inner(message, *args, **kwargs):
  if (message.http_session is not None):
   transfer_user(message.http_session, message.channel_session)
  return func(message, *args, **kwargs)
 return inner

def channel_session_user_from_http ( func ) : @ http_session_user @ channel_session @ functools . wraps ( func ) def inner ( message , * args , ** kwargs ) : if ( message . http_session is not None ) : transfer_user ( message . http_session , message . channel_session ) return func ( message , * args , ** kwargs ) return inner
decorator that automatically transfers the user from http sessions to channel-based sessions .