summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-01-01 11:44:41 +0100
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-01-01 11:44:41 +0100
commit2b93619be566585796ac7ac337cd903060b71c3b (patch)
tree00d5111ee146d3854b60c3657e36e457172e7c6e
parentdb119f7426e06a7fefebeecff831af56375fa33e (diff)
Big change. Now messages even to older clients should be good.
-rw-r--r--gadu/channel/text.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gadu/channel/text.py b/gadu/channel/text.py
index b781d6f..0f4c2fa 100644
--- a/gadu/channel/text.py
+++ b/gadu/channel/text.py
@@ -46,7 +46,8 @@ class GaduTextChannel(telepathy.server.ChannelTypeText):
def Send(self, message_type, text):
if message_type == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
logger.info("Sending message : %s" % unicode(text))
- self.conn.gadu_client.sendTo(int(self.contact.uin), str(text), str(text))
+ msg = text.encode('windows-1250')
+ self.conn.gadu_client.sendTo(int(self.contact.uin), str(text), str(msg))
else:
raise telepathy.NotImplemented("Unhandled message type")
self.Sent(int(time.time()), message_type, text)