aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-08-27 02:47:49 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2009-08-28 04:16:53 +0800
commitc74685b02308c82d355fc59e1aa8491c84a2f114 (patch)
treee16276972c44a78a028740e69a26170521268e52 /libempathy
parentdec9d4dcf8c7611862221be9eadb53ef52a5bc3b (diff)
downloadgsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar.gz
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar.bz2
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar.lz
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar.xz
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.tar.zst
gsoc2013-empathy-c74685b02308c82d355fc59e1aa8491c84a2f114.zip
Don't parse message in EmpathyMessage:body setter
This fixes a bug where the message (Type_Action, "/me wooo yay") is printed as " ! wjt woo yay" rather than as " ! wjt /me woo yay". This also fixes Gnome bug #593101 (Empathy exits sending empty /me message), which was caused by this deleted code walking off the end of the string "/me".
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-message.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index 0da55112d..34a466752 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -393,28 +393,15 @@ empathy_message_set_body (EmpathyMessage *message,
const gchar *body)
{
EmpathyMessagePriv *priv = GET_PRIV (message);
- TpChannelTextMessageType type;
g_return_if_fail (EMPATHY_IS_MESSAGE (message));
g_free (priv->body);
- priv->body = NULL;
-
- type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
- if (g_str_has_prefix (body, "/me")) {
- type = TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION;
- body += 4;
- }
- else if (g_str_has_prefix (body, "/say")) {
- body += 5;
- }
if (body) {
priv->body = g_strdup (body);
- }
-
- if (type != priv->type) {
- empathy_message_set_tptype (message, type);
+ } else {
+ priv->body = NULL;
}
g_object_notify (G_OBJECT (message), "body");