diff --git a/INSTALL.rst b/INSTALL.rst index 97b2da4..c8f6ae8 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -104,14 +104,12 @@ Install required dependencies: :: - $ pip install --pre e4u protobuf python-dateutil yowsup2 + $ pip install --pre protobuf python-dateutil yowsup2 -- e4u_: is a simple emoji4unicode python bindings - yowsup_: is a python library that enables you build application which use WhatsApp service. .. _Spectrum 2: http://www.spectrum.im -.. _Yowsup 2: https://github.com/tgalal/yowsup +.. _Yowsup 3: https://github.com/tgalal/yowsup .. _Github: https://github.com/hanzz/libtransport .. _yowsup: https://github.com/tgalal/yowsup -.. _e4u: https://pypi.python.org/pypi/e4u diff --git a/setup.py b/setup.py index ee9e6ed..5180dc1 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,6 @@ setup(name='transwhat', install_requires=[ 'protobuf', 'yowsup', - 'e4u', 'Pillow', 'python-dateutil' ], diff --git a/transWhat/buddy.py b/transWhat/buddy.py index c232d09..dc75841 100644 --- a/transWhat/buddy.py +++ b/transWhat/buddy.py @@ -114,7 +114,7 @@ class BuddyList(dict): if status is None: buddy.statusMsg = "" else: - buddy.statusMsg = utils.softToUni(status) + buddy.statusMsg = status self.updateSpectrum(buddy) def load(self, buddies): diff --git a/transWhat/session.py b/transWhat/session.py index 9678f56..0424549 100644 --- a/transWhat/session.py +++ b/transWhat/session.py @@ -141,7 +141,7 @@ class Session(YowsupApp): if room not in self.groups: owner = group.getOwner().split('@')[0] subjectOwner = group.getSubjectOwner().split('@')[0] - subject = utils.softToUni(group.getSubject()) + subject = group.getSubject() self.groups[room] = Group(room, owner, subject, subjectOwner, self.backend, self.user) # add/update room participants @@ -276,7 +276,7 @@ class Session(YowsupApp): def onTextMessage(self, _id, _from, to, notify, timestamp, participant, offline, retry, body): buddy = _from.split('@')[0] - messageContent = utils.softToUni(body) + messageContent = body self.sendReceipt(_id, _from, None, participant) self.recvMsgIDs.append((_id, _from, participant, timestamp)) self.logger.info("Message received from %s to %s: %s (at ts=%s)" % @@ -436,7 +436,7 @@ class Session(YowsupApp): room = group.getGroupId() owner = group.getCreatorJid(full = False) subjectOwner = group.getSubjectOwnerJid(full = False) - subject = utils.softToUni(group.getSubject()) + subject = group.getSubject() self.groups[room] = Group(room, owner, subject, subjectOwner, self.backend, self.user) self.groups[room].addParticipants(group.getParticipants(), self.buddies, self.legacyName) diff --git a/transWhat/transwhat.py b/transWhat/transwhat.py index 27fff6e..8ec0e60 100755 --- a/transWhat/transwhat.py +++ b/transWhat/transwhat.py @@ -28,7 +28,6 @@ import traceback import logging import asyncore import sys, os -import e4u import Queue import transWhat.threadutils @@ -79,8 +78,6 @@ def handleTransportData(data): logger = logging.getLogger('transwhat') logger.error(traceback.format_exc()) -e4u.load() - closed = False def connectionClosed(): global closed diff --git a/transWhat/utils.py b/transWhat/utils.py index 30606fd..a5cf08b 100644 --- a/transWhat/utils.py +++ b/transWhat/utils.py @@ -21,7 +21,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -import e4u import base64 import hashlib @@ -42,9 +41,6 @@ def ago(secs): return "%d %s ago" % (diff, period) -def softToUni(message): - return e4u.translate(message.encode("utf-8"), reverse=False, **e4u.SOFTBANK_TRANSLATE_PROFILE) - def decodePassword(password): return base64.b64decode(bytes(password))