naughty: Don't try to parse our version number

The code here doesn't always work, so it's best to just don't mess with
awesome.version, but return it directly.

Fixes: https://github.com/awesomeWM/awesome/issues/569
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-01-15 20:12:19 +01:00
parent 82f74aa895
commit 1367968824
1 changed files with 2 additions and 2 deletions

View File

@ -195,8 +195,8 @@ capi.dbus.connect_signal("org.freedesktop.Notifications", function (data, appnam
naughty.destroy(obj, naughty.notificationClosedReason.dismissedByCommand) naughty.destroy(obj, naughty.notificationClosedReason.dismissedByCommand)
end end
elseif data.member == "GetServerInfo" or data.member == "GetServerInformation" then elseif data.member == "GetServerInfo" or data.member == "GetServerInformation" then
-- name of notification app, name of vender, version -- name of notification app, name of vender, version, specification version
return "s", "naughty", "s", "awesome", "s", capi.awesome.version:match("%d.%d"), "s", "1.0" return "s", "naughty", "s", "awesome", "s", capi.awesome.version, "s", "1.0"
elseif data.member == "GetCapabilities" then elseif data.member == "GetCapabilities" then
-- We actually do display the body of the message, we support <b>, <i> -- We actually do display the body of the message, we support <b>, <i>
-- and <u> in the body and we handle static (non-animated) icons. -- and <u> in the body and we handle static (non-animated) icons.