From 3528fbd730a6d28e7e0139d00bcf04b36644e8f8 Mon Sep 17 00:00:00 2001 From: Teddy Date: Thu, 29 Aug 2013 16:29:29 +0800 Subject: do not push to the sender itself --- server/piztor/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/piztor/server.py b/server/piztor/server.py index a4101ef..1814a39 100644 --- a/server/piztor/server.py +++ b/server/piztor/server.py @@ -292,6 +292,7 @@ class LocationUpdateHandler(RequestHandler): pdata = PushLocationData(uauth.uid, lat, lng) for user in ulist: uid = user.id + if uid == uauth.uid: continue if pt.has_key(uid): tunnel = pt[uid] tunnel.add(pdata) @@ -557,6 +558,7 @@ class SendTextMessageHandler(RequestHandler): for user in ulist: uid = user.id + if uid == uauth.uid: continue if pt.has_key(uid): tunnel = pt[uid] tunnel.add(PushTextMesgData(mesg)) @@ -668,6 +670,6 @@ from twisted.internet import reactor f = PTPFactory() f.protocol = PTP -reactor.listenTCP(2223, f) +reactor.listenTCP(2222, f) logger.warning("The server is lanuched") reactor.run() -- cgit v1.2.3-70-g09d2