Add groups protocol layer
This commit is contained in:
parent
85c320e24c
commit
af0150866d
|
@ -32,7 +32,8 @@ from yowsup.layers import YowLayerEvent, YowParallelLayer
|
||||||
from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
|
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))
|
||||||
|
|
Loading…
Reference in a new issue