Skip to content

Commit 08c859c

Browse files
committed
Added in first testing recv function to listen for incoming messages
1 parent 243b515 commit 08c859c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

xmppcmd.bash

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ XMPP_CMDS+=( get_nodes get_items get_item , )
3434
XMPP_CMDS+=( get_subscriptions get_subscribers set_subscribers , )
3535
XMPP_CMDS+=( get_affiliations get_affiliates set_affiliations , )
3636
XMPP_CMDS+=( get_vcard set_vcard , )
37-
XMPP_CMDS+=( send send_stanza_iq stanza_pubsub )
37+
XMPP_CMDS+=( send send_stanza_iq stanza_pubsub , )
38+
XMPP_CMDS+=( recv )
3839

3940
# DEPRECIATED method
4041
# Using the commandline utility sendxmpp
@@ -132,6 +133,11 @@ send() {
132133
fi
133134
}
134135

136+
# Open stream and listen on jid
137+
recv() {
138+
$XMPPTOOLS_DIR/xmpprecv "${xmpp_user}@${xmpp_host}" ${xmpp_pass} -s
139+
}
140+
135141
# This function allows you to input an unqualified jid, like bob
136142
# and get the local qualified jid bob@example.com
137143
# Example: jid=$(qualify_jid bob)

0 commit comments

Comments
 (0)