Add groups protocol layer

This commit is contained in:
moyamo 2015-06-21 18:20:09 +02:00
parent 85c320e24c
commit af0150866d

View file

@ -33,6 +33,7 @@ from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
from yowsup.layers.auth import (YowCryptLayer, YowAuthenticationProtocolLayer, from yowsup.layers.auth import (YowCryptLayer, YowAuthenticationProtocolLayer,
AuthError) AuthError)
from yowsup.layers.protocol_iq import YowIqProtocolLayer from yowsup.layers.protocol_iq import YowIqProtocolLayer
from yowsup.layers.protocol_groups import YowGroupsProtocolLayer
from yowsup.layers.coder import YowCoderLayer from yowsup.layers.coder import YowCoderLayer
from yowsup.layers.network import YowNetworkLayer from yowsup.layers.network import YowNetworkLayer
from yowsup.layers.protocol_messages import YowMessagesProtocolLayer from yowsup.layers.protocol_messages import YowMessagesProtocolLayer
@ -87,7 +88,7 @@ class Session():
YowMessagesProtocolLayer, YowMessagesProtocolLayer,
YowReceiptProtocolLayer, YowReceiptProtocolLayer,
YowAckProtocolLayer, YowAckProtocolLayer,
YowMediaProtocolLayer, YowIqProtocolLayer)), YowMediaProtocolLayer, YowIqProtocolLayer, YowGroupsProtocolLayer)),
YowCoderLayer, YowCoderLayer,
YowCryptLayer, YowCryptLayer,
YowStanzaRegulator, YowStanzaRegulator,
@ -124,6 +125,7 @@ class Session():
YowConstants.DOMAIN) YowConstants.DOMAIN)
self.stack.setProp(YowCoderLayer.PROP_RESOURCE, self.stack.setProp(YowCoderLayer.PROP_RESOURCE,
env.CURRENT_ENV.getResource()) env.CURRENT_ENV.getResource())
self.stack.setProp(YowIqProtocolLayer.PROP_PING_INTERVAL, 5)
try: try:
self.stack.broadcastEvent( self.stack.broadcastEvent(
YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT)) YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))