[telepathy-gabble/master] Send chat state notifications as type='chat'
Will Thompson
will.thompson at collabora.co.uk
Sat Nov 7 05:40:21 PST 2009
This has been a SHOULD since 2003-09-18. From XEP-0085 §5.4:
This protocol SHOULD NOT be used with message types other than
"chat" or "groupchat".
---
src/im-channel.c | 4 ++--
tests/twisted/text/test-chat-state.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/im-channel.c b/src/im-channel.c
index 3ed7438..0c077b4 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -416,7 +416,7 @@ emit_closed_and_send_gone (GabbleIMChannel *self)
{
if (chat_states_supported (self))
gabble_message_util_send_chat_state (G_OBJECT (self), priv->conn,
- LM_MESSAGE_SUB_TYPE_NORMAL, TP_CHANNEL_CHAT_STATE_GONE,
+ LM_MESSAGE_SUB_TYPE_CHAT, TP_CHANNEL_CHAT_STATE_GONE,
priv->peer_jid, NULL);
priv->send_gone = FALSE;
@@ -816,7 +816,7 @@ gabble_im_channel_set_chat_state (TpSvcChannelInterfaceChatState *iface,
else if (chat_states_supported (self))
{
if (gabble_message_util_send_chat_state (G_OBJECT (self), priv->conn,
- LM_MESSAGE_SUB_TYPE_NORMAL, state, priv->peer_jid, &error))
+ LM_MESSAGE_SUB_TYPE_CHAT, state, priv->peer_jid, &error))
{
priv->send_gone = TRUE;
diff --git a/tests/twisted/text/test-chat-state.py b/tests/twisted/text/test-chat-state.py
index 93aa58c..9b3efed 100644
--- a/tests/twisted/text/test-chat-state.py
+++ b/tests/twisted/text/test-chat-state.py
@@ -13,7 +13,7 @@ import ns
def check_state_notification(elem, name):
assertEquals('message', elem.name)
- assertEquals('normal', elem['type'])
+ assertEquals('chat', elem['type'])
children = list(elem.elements())
assert len(children) == 1, elem.toXml()
--
1.5.6.5
More information about the telepathy-commits
mailing list