Skip to content

Commit 5fd3c2b

Browse files
committed
Converted purge and get_nodes to use new stanza builders
* General cleanup
1 parent 58c4398 commit 5fd3c2b

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

xmppcmd.bash

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,10 @@ retract() {
551551
fi
552552

553553
eof \
554-
| stanza item "id=$item_id" \
555-
| stanza retract "node=$node" \
556-
| stanza_pubsub \
557-
| send_stanza_iq set
554+
| stanza item "id=$item_id" \
555+
| stanza retract "node=$node" \
556+
| stanza_pubsub \
557+
| send_stanza_iq set
558558
}
559559

560560
# Purge all node items
@@ -568,9 +568,10 @@ purge() {
568568
return 0
569569
fi
570570

571-
echo "<purge node='$node'/>" \
572-
| stanza_pubsub owner \
573-
| send_stanza_iq set
571+
eof \
572+
| stanza purge "node=$node" \
573+
| stanza_pubsub owner \
574+
| send_stanza_iq set
574575
}
575576

576577
# subscribe <node> <jid>
@@ -616,8 +617,9 @@ get_nodes() {
616617
return 0
617618
fi
618619

619-
echo "<query xmlns='http://jabber.org/protocol/disco#items'/>" \
620-
| send_stanza_iq get
620+
eof \
621+
| stanza query "xmlns=http://jabber.org/protocol/disco#items" \
622+
| send_stanza_iq get
621623
}
622624

623625
# Get your subscription list OR subscriptions with a certain node

0 commit comments

Comments
 (0)