Mercurial > prosody-modules
comparison 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 | 61422d3c60fb |
comparison
equal
deleted
inserted
replaced
| 5214:d5492bc861f6 | 5215:fd6cb4365438 |
|---|---|
| 25 | 25 |
| 26 local host_sessions = prosody.hosts[module.host].sessions; | 26 local host_sessions = prosody.hosts[module.host].sessions; |
| 27 local push_errors = module:shared("push_errors"); | 27 local push_errors = module:shared("push_errors"); |
| 28 local id2node = {}; | 28 local id2node = {}; |
| 29 local id2identifier = {}; | 29 local id2identifier = {}; |
| 30 | |
| 31 if _VERSION:match("5%.1") then | |
| 32 module:log("warn", "This module may behave incorrectly on Lua 5.1. It is recommended to upgrade to a newer Lua version."); | |
| 33 end | |
| 30 | 34 |
| 31 -- For keeping state across reloads while caching reads | 35 -- For keeping state across reloads while caching reads |
| 32 -- This uses util.cache for caching the most recent devices and removing all old devices when max_push_devices is reached | 36 -- This uses util.cache for caching the most recent devices and removing all old devices when max_push_devices is reached |
| 33 local push_store = (function() | 37 local push_store = (function() |
| 34 local store = module:open_store(); | 38 local store = module:open_store(); |
