plugins.presence: If a string is given as presece options, use it as status

Sat, 04 Jun 2016 13:37:06 +0200

author
Kim Alvefur <zash@zash.se>
date
Sat, 04 Jun 2016 13:37:06 +0200
changeset 406
3c732f1d990c
parent 405
f065fc1fab0a
child 407
c99db5172309

plugins.presence: If a string is given as presece options, use it as status

plugins/presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/presence.lua	Sat Jun 04 13:36:39 2016 +0200
+++ b/plugins/presence.lua	Sat Jun 04 13:37:06 2016 +0200
@@ -27,9 +27,9 @@
 			if opts.status or opts.msg then
 				p:tag("status"):text(opts.status or opts.msg):up();
 			end
+		elseif type(opts) == "string" then
+			p:tag("status"):text(opts):up();
 		end
-		-- TODO maybe use opts as prio if it's a int,
-		-- or as show or status if it's a string?
 
 		stream:send(p);
 	end

mercurial