def __init__(self, credentials, messages):
        """
        :param credentials:
        :param messages: list of (jid, message) tuples
        :return:
        """
        stackBuilder = YowStackBuilder()

        self._stack = stackBuilder\
            .pushDefaultLayers()\
            .push(SendLayer)\
            .build()

        self._stack.setProp(SendLayer.PROP_MESSAGES, messages)
        self._stack.setProp(YowAuthenticationProtocolLayer.PROP_PASSIVE, True)
        self._stack.setCredentials(credentials)
def __init__ ( self , credentials , messages ) : stackBuilder = YowStackBuilder ( ) self . _stack = stackBuilder . pushDefaultLayers ( ) . push ( SendLayer ) . build ( ) self . _stack . setProp ( SendLayer . PROP_MESSAGES , messages ) self . _stack . setProp ( YowAuthenticationProtocolLayer . PROP_PASSIVE , True ) self . _stack . setCredentials ( credentials )
:param credentials:
        :param messages: list of (jid, message) tuples
        :return: