#NEWLINE# def post( self ) : #NEWLINE# #INDENT# message_type = self . request . get ( 'message_type' ) #NEWLINE# to = self . request . get ( 'to' ) #NEWLINE# from_ = self . request . get ( 'from' ) #NEWLINE# if ( message_type == 'chat' ) : #NEWLINE# #INDENT# self . _send_chat ( to , from_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( message_type == 'presence' ) : #NEWLINE# #INDENT# if ( self . request . get ( 'presence' ) == 'available' ) : #NEWLINE# #INDENT# self . _send_presence_available ( to , from_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . request . get ( 'presence' ) == 'unavailable' ) : #NEWLINE# #INDENT# self . _send_presence_unavailable ( to , from_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( message_type == 'subscribe' ) : #NEWLINE# #INDENT# self . _send_subscription ( self , from_ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert 0