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".
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");