diff mod_cloud_notify/mod_cloud_notify.lua @ 5215:fd6cb4365438

mod_cloud_notify: Log warning when used on Lua 5.1
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Mar 2023 10:24:58 +0000
parents c728e82265a7
children
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua	Mon Mar 06 16:53:27 2023 +0100
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Tue Mar 07 10:24:58 2023 +0000
@@ -28,6 +28,10 @@
 local id2node = {};
 local id2identifier = {};
 
+if _VERSION:match("5%.1") then
+	module:log("warn", "This module may behave incorrectly on Lua 5.1. It is recommended to upgrade to a newer Lua version.");
+end
+
 -- For keeping state across reloads while caching reads
 -- This uses util.cache for caching the most recent devices and removing all old devices when max_push_devices is reached
 local push_store = (function()