Enable Axolotl encryption as it is mandatory.

This commit is contained in:
moyamo 2015-08-29 22:01:44 +02:00
parent 2f73ed1a10
commit 59754848a7

View file

@ -30,6 +30,7 @@ import time
from yowsup.stacks import YowStack from yowsup.stacks import YowStack
from yowsup.layers import YowLayerEvent, YowParallelLayer from yowsup.layers import YowLayerEvent, YowParallelLayer
from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
from yowsup.layers.axolotl import YowAxolotlLayer
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
@ -94,6 +95,7 @@ class Session():
YowIqProtocolLayer, YowIqProtocolLayer,
YowGroupsProtocolLayer, YowGroupsProtocolLayer,
YowPresenceProtocolLayer)), YowPresenceProtocolLayer)),
YowAxolotlLayer,
YowCoderLayer, YowCoderLayer,
YowCryptLayer, YowCryptLayer,
YowStanzaRegulator, YowStanzaRegulator,
@ -530,7 +532,8 @@ class SpectrumLayer(YowInterfaceLayer):
jid = presence.getFrom() jid = presence.getFrom()
lastseen = presence.getLast() lastseen = presence.getLast()
buddy = jid.split("@")[0] buddy = jid.split("@")[0]
self.logger.info("Lastseen: %s %s", buddy, utils.ago(lastseen)) # seems to be causing an error
# self.logger.info("Lastseen: %s %s", buddy, utils.ago(lastseen))
if buddy in self.session.presenceRequested: if buddy in self.session.presenceRequested:
timestamp = time.localtime(time.time() - lastseen) timestamp = time.localtime(time.time() - lastseen)