Mercurial > prosody-modules
changeset 4656:4eb684ab440c
mod_spam_reporting: Handle unknown or future report types
An unrecognised value in the 'reason' attribute would have caused an error.
This change makes it mirror the behavior for the previous XEP version.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 25 Aug 2021 15:05:56 +0200 |
| parents | 7f61d89a594d |
| children | 78ef5d9e2361 |
| files | mod_spam_reporting/mod_spam_reporting.lua |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_spam_reporting/mod_spam_reporting.lua Wed Aug 25 16:05:09 2021 +0200 +++ b/mod_spam_reporting/mod_spam_reporting.lua Wed Aug 25 15:05:56 2021 +0200 @@ -1,5 +1,5 @@ -- XEP-0377: Spam Reporting for Prosody --- Copyright (C) -2016 Kim Alvefur +-- Copyright (C) 2016-2021 Kim Alvefur -- -- This file is MIT/X11 licensed. @@ -28,7 +28,7 @@ else report = item:get_child("report", "urn:xmpp:reporting:1"); if report and jid then - local type + local type = "unknown"; if report.attr.reason == "urn:xmpp:reporting:abuse" then type = "abuse"; end
