After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 622118 - Empathy should send actions verbatim if not supported by the network
Empathy should send actions verbatim if not supported by the network
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-19 18:39 UTC by Laurent Bigonville
Modified: 2011-04-06 09:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
send '/me' message verbatim if CM doesn't support Action messages (#622118) (1.57 KB, patch)
2011-04-06 08:27 UTC, Guillaume Desmottes
none Details | Review
add empathy_tp_chat_get_self_contact() (1.38 KB, patch)
2011-04-06 09:41 UTC, Guillaume Desmottes
none Details | Review
emulate '/me' command if CM doesn't support Action messages (#622118) (1.82 KB, patch)
2011-04-06 09:41 UTC, Guillaume Desmottes
none Details | Review

Description Laurent Bigonville 2010-06-19 18:39:37 UTC
Hi

Typing /me when chatting with a MSN contact (connected to MSN with butterfly), I get an error: "- Error sending message "test": unknown"

If the network (or CM) doesn't support an action, I guess that the text should be sent verbatim.
Comment 1 Guillaume Desmottes 2010-06-21 07:45:21 UTC
Right, Empathy should check that the Action type is supported.
http://telepathy.freedesktop.org/spec/Channel_Type_Text.html#org.freedesktop.Telepathy.Channel.Type.Text.GetMessageTypes
Comment 2 Guillaume Desmottes 2011-04-06 08:27:27 UTC
Created attachment 185266 [details] [review]
send '/me' message verbatim if CM doesn't support Action messages (#622118)
Comment 3 Emilio Pozuelo Monfort 2011-04-06 08:38:53 UTC
+		tmp = g_strdup_printf ("/me %s", strv[1]);

This can confuse non-English speakers. I wonder if we shouldn't set it to "%s %s", self_alias, strv[1] ?
Comment 4 Guillaume Desmottes 2011-04-06 09:12:28 UTC
Good point, but that's trickier that it looks. The EmpathyChat doesn't have a reference on our self TpContact (or EmpathyContact), so that means we'll have to request a TpContact asynchronoulsy and delay sending of the message until this call succeeds. That's, imho, a bit overkill for such fallback and, worst, can break ordering of sent messages as if user sends another not /me message right after, it may be sent before this one.
Comment 5 Emilio Pozuelo Monfort 2011-04-06 09:26:41 UTC
EmpathyTpChat has a reference to our EmpathyContact though. Can't you get it with tp_chat_get_members(), or add an accessor for it?

I agree that doing an async call to get it is a bad idea.
Comment 6 Guillaume Desmottes 2011-04-06 09:41:14 UTC
Created attachment 185272 [details] [review]
add empathy_tp_chat_get_self_contact()
Comment 7 Guillaume Desmottes 2011-04-06 09:41:17 UTC
Created attachment 185273 [details] [review]
emulate '/me' command if CM doesn't support Action messages (#622118)
Comment 8 Emilio Pozuelo Monfort 2011-04-06 09:45:33 UTC
+EmpathyContact *
+empathy_tp_chat_get_self_contact (EmpathyTpChat *self)
+{
+	EmpathyTpChatPriv *priv = GET_PRIV (self);

Maybe add a g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL); ?

Looks fine otherwise.
Comment 9 Guillaume Desmottes 2011-04-06 09:50:14 UTC
Merged to master; thanks!

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.