Changeset

140:8815232cbbeb

clix.watch_pep: Take PEP node as positional argument Thanks MattJ
author Kim Alvefur <zash@zash.se>
date Sun, 15 Nov 2020 20:45:50 +0100
parents 139:6909e479c56b
children 141:93eda3dd85f7
files clix/watch_pep.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/clix/watch_pep.lua	Sun Nov 15 15:05:24 2020 +0100
+++ b/clix/watch_pep.lua	Sun Nov 15 20:45:50 2020 +0100
@@ -1,14 +1,14 @@
 local verse = require "verse";
 
 return function (opts, arg)
-	if opts.short_help then
+	if opts.short_help or not arg[1] then
 		print("Watches PEP notifications from all contacts")
-		print("clix watch_pep [--node PEP-NODE] [--noempty]")
+		print("clix watch_pep [--noempty] PEP-NODE")
 		return;
 	end
 
 	local function onconnect(conn)
-		conn:hook_pep(opts.node or "urn:xmpp:microblog:0", function (event)
+		conn:hook_pep(arg[1], function (event)
 			local payload = event.item;
 			if not payload then return end
 			if opts.noempty and not payload[1] then return end