changeset 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 d5492bc861f6
children 1d9dbe84b6e8
files mod_cloud_notify/mod_cloud_notify.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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()