def createServerActionMessageError(actionID, pyGlooxTag): errorType, condition = ProxyHandler( StanzaErrorExtension()).handleTag(pyGlooxTag) return ServerActionError( actionID, errorType, condition ) if condition != DEF_STANZA_ERROR_CONDITION else ClientActionError( actionID, CLIENT_ERROR_ID.GENERIC)
def createServerUserRoomCreationIQError(pyGlooxTag, roomName): errorID = IQHandler(WgErrorExtension()).handleTag(pyGlooxTag) if errorID != xmpp_constants.MUC_CREATION_ERROR.UNDEFINED: error = ServerUserRoomCreationError(errorID, roomName) else: error = ServerActionError(CLIENT_ACTION_ID.CREATE_USER_ROOM, *IQHandler(StanzaErrorExtension()).handleTag(pyGlooxTag)) return error
def createServerActionError(actionID, pyGlooxTag): return ServerActionError( actionID, IQHandler(StanzaErrorExtension()).handleTag(pyGlooxTag)[1])
def createServerError(pyGlooxTag): return StanzaConditionError( IQHandler(StanzaErrorExtension()).handleTag(pyGlooxTag)[1])
def createServerActionPresenceError(actionID, pyGlooxTag): return ServerActionError( actionID, *ProxyHandler(StanzaErrorExtension()).handleTag(pyGlooxTag))
def createServerPresenceError(pyGlooxTag): return StanzaConditionError( *ProxyHandler(StanzaErrorExtension()).handleTag(pyGlooxTag))