always treat entity as unicode() when outputting it to logging

This commit is contained in:
git-o-bot 2016-04-27 23:08:47 +02:00
parent 5063966772
commit 5e1636237e

View file

@ -815,7 +815,7 @@ class YowsupAppLayer(YowInterfaceLayer):
@ProtocolEntityCallback('message') @ProtocolEntityCallback('message')
def onMessageReceived(self, entity): def onMessageReceived(self, entity):
self.logger.debug("Received Message: %s" % entity) self.logger.debug("Received Message: %s" % unicode(entity))
if entity.getType() == MessageProtocolEntity.MESSAGE_TYPE_TEXT: if entity.getType() == MessageProtocolEntity.MESSAGE_TYPE_TEXT:
self.caller.onTextMessage( self.caller.onTextMessage(
entity._id, entity._id,