# HG changeset patch # User Kim Alvefur # Date 1329691809 -3600 # Node ID 075ecfa464846ee5adbb914c6081b59a0ad33ff7 # Parent 5e93cfc734447023177225540a50d039ee5861bd clix.publish_atom: Don't quit until the server responds to our publish request. diff -r 5e93cfc73444 -r 075ecfa46484 clix/publish_atom.lua --- a/clix/publish_atom.lua Sun Feb 12 20:45:06 2012 +0000 +++ b/clix/publish_atom.lua Sun Feb 19 23:50:09 2012 +0100 @@ -35,10 +35,13 @@ atom_entry:tag("content"):text(opts.content):up(); end - conn.pubsub(opts.service, opts.node):publish(entry_id, nil, atom_entry); + conn.pubsub(opts.service, opts.node):publish(entry_id, nil, atom_entry + , function(ok) + -- TODO Report success? + conn:close(); + end); --conn:send(verse.message({ to = opts.to, type = "chat" }) :body(text)); - conn:close(); end clix_connect(opts, on_connect); end