From 69a0d5578e4040b1feb44c01e175253565c2dd11 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 15 May 2009 11:27:03 +0100 Subject: [PATCH] Strip out leading #/! from tags in stream for Facebook and Pidgin --- gwibber/microblog/facebook.py | 2 ++ gwibber/pidgin.py | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/gwibber/microblog/facebook.py b/gwibber/microblog/facebook.py index af5ce2a..6a1f58d 100644 --- a/gwibber/microblog/facebook.py +++ b/gwibber/microblog/facebook.py @@ -93,5 +93,7 @@ class Client: yield Message(self, data) def send(self, message): + # Facebook doesn't really want to see !tag and #tag's in it's output + message = re.sub(" [\!#]{1}", " ", message) self.facebook.users.setStatus(message, False) diff --git a/gwibber/pidgin.py b/gwibber/pidgin.py index 8de0fe1..d33f07c 100644 --- a/gwibber/pidgin.py +++ b/gwibber/pidgin.py @@ -7,6 +7,7 @@ SegPhault (Ryan Paul) - 11/09/2008 """ from . import gintegration import dbus +import re from microblog import can PROTOCOL_INFO = { @@ -30,5 +31,7 @@ class Client: return self.account["send_enabled"] def send(self, message): + # Strip out leading (!#) !tag and #tag's for pidgin + message = re.sub(" [\!#]{1}", " ", message) if gintegration.service_is_running("im.pidgin.purple.PurpleService"): gintegration.set_pidgin_status_text(message) -- 1.6.0.6