libpurple/purpleprotocolconversation.c

changeset 42368
2630a8a2d64d
parent 42354
b5caf6b7705a
child 42594
eddde70cedd8
--- a/libpurple/purpleprotocolconversation.c	Tue Oct 17 03:47:51 2023 -0500
+++ b/libpurple/purpleprotocolconversation.c	Tue Oct 17 03:50:32 2023 -0500
@@ -233,3 +233,22 @@
 
 	return FALSE;
 }
+
+void
+purple_protocol_conversation_send_typing(PurpleProtocolConversation *protocol,
+                                         PurpleConversation *conversation,
+                                         PurpleTypingState state)
+{
+	PurpleProtocolConversationInterface *iface = NULL;
+
+	g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol));
+	g_return_if_fail(PURPLE_IS_CONVERSATION(conversation));
+
+	iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol);
+	if(iface != NULL && iface->send_typing != NULL) {
+		iface->send_typing(protocol, conversation, state);
+	} else {
+		g_warning("%s does not implement send_typing",
+		          G_OBJECT_TYPE_NAME(protocol));
+	}
+}

mercurial