Mercurial > prosody-modules
view mod_cloud_notify_priority_tag/mod_cloud_notify_priority_tag.lua @ 5202:b81fd0d22c66
mod_http_oauth2: Calculate client secret expiry in registration response
Not actually the client_secret that expires, but the client_id JWT.
Returning '0' indicating no expiry was incorrect unless JWT expiry is
turned off, which we check for now.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Mar 2023 17:06:47 +0100 |
parents | d90ce7dc3f88 |
children |
line wrap: on
line source
local xmlns_push_priority = "tigase:push:priority:0"; -- https://xeps.tigase.net//docs/push-notifications/encrypt/#41-discovering-support local function account_disco_info(event) event.reply:tag("feature", {var=xmlns_push_priority}):up(); end module:hook("account-disco-info", account_disco_info); function handle_push(event) if event.important then event.notification_payload:text_tag("priority", "high", { xmlns = xmlns_push_priority }); end end module:hook("cloud_notify/push", handle_push);