From 5c3f03a31ad0d7b96f9e01d9785a7ebef2bd64f2 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 19 Aug 2024 23:00:17 -0400 Subject: [PATCH] fix: Update zone name discovery to ignore icon metadata (#52) Signed-off-by: Gerard Hickey --- .github/ISSUE_TEMPLATE/Bug Report.yml | 1 + meshchatlib.lua | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml index 3556625..5f5956c 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yml @@ -30,6 +30,7 @@ body: - v2.0 - v2.8 - v2.9 - v2.10 + - v2.12.0 - development build (include version in what happened) default: 0 validations: diff --git a/meshchatlib.lua b/meshchatlib.lua index f409ea2..e9a4492 100755 --- a/meshchatlib.lua +++ b/meshchatlib.lua @@ -89,7 +89,10 @@ function zone_name() if nixio.fs.access(servfile) then for line in io.lines(servfile) do - local zone = line:match("^(.*)|.*|.*|.*|.*|meshchat$") + -- this will match the new service names with the icon metadata + -- in this case we are using a space or a pipe to terminate + -- the service name + local zone = line:match("^(.-)[%s%|].*|meshchat$") if zone then return zone end