clix/publish_atom.lua

changeset 71
075ecfa46484
parent 69
4b65a9a0229b
child 72
0f69e1902f5b
--- 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

mercurial