Create a hook for sent messages
[cascardo/chat.git] / xmpp.c
diff --git a/xmpp.c b/xmpp.c
index 94cd9ab..8095af7 100644 (file)
--- a/xmpp.c
+++ b/xmpp.c
@@ -168,9 +168,22 @@ hc_xmpp_set_msg_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
   xmpp->msghook = hook;
 }
 
+void
+hc_xmpp_set_sent_msg_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
+{
+  xmpp->sentmsghook = hook;
+}
+
 void
 hc_xmpp_recv_message (hc_xmpp_t *xmpp, iks *stanza)
 {
   if (xmpp->msghook)
     xmpp->msghook (xmpp, stanza);
 }
+
+void
+hc_xmpp_sent_message (hc_xmpp_t *xmpp, iks *stanza)
+{
+  if (xmpp->sentmsghook)
+    xmpp->sentmsghook (xmpp, stanza);
+}