Software /
code /
prosody-modules
Comparison
mod_watchuntrusted/mod_watchuntrusted.lua @ 3020:ec671ad1a8a9
mod_watchuntrusted: Add option for which message 'type' to use on notifications
Because poezio treats headline messages in a very sensible way that fits
great with this kind of system message
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 20 May 2018 16:21:07 +0200 |
parent | 2887:65082d91950e |
child | 3022:3996437ff64f |
comparison
equal
deleted
inserted
replaced
3019:b19d64dd4c66 | 3020:ec671ad1a8a9 |
---|---|
47 sha1 = event.cert and event.cert:digest("sha1") or "(No certificate)", | 47 sha1 = event.cert and event.cert:digest("sha1") or "(No certificate)", |
48 sha256 = event.cert and event.cert:digest("sha256") or "(No certificate)", | 48 sha256 = event.cert and event.cert:digest("sha256") or "(No certificate)", |
49 errors = error_message | 49 errors = error_message |
50 }; | 50 }; |
51 | 51 |
52 local message = st.message({ type = "chat", from = local_host }, | 52 local message = st.message({ type = msg_type, from = local_host }, |
53 untrusted_fail_notification:gsub("%$([%w_]+)", function (v) | 53 untrusted_fail_notification:gsub("%$([%w_]+)", function (v) |
54 return event[v] or session and session[v] or replacements and replacements[v] or nil; | 54 return event[v] or session and session[v] or replacements and replacements[v] or nil; |
55 end)); | 55 end)); |
56 for jid in untrusted_fail_watchers do | 56 for jid in untrusted_fail_watchers do |
57 module:log("debug", "Notifying %s", jid); | 57 module:log("debug", "Notifying %s", jid); |