Software / code / prosody
Comparison
plugins/mod_carbons.lua @ 10818:04a0aa6d7e72
mod_carbons: Describe return types in a comment
For similarity with mod_mam, mod_csi_simple
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 09 May 2020 00:50:59 +0200 |
| parent | 10802:c11f9cd6c761 |
| child | 10820:e0a09d3af563 |
comparison
equal
deleted
inserted
replaced
| 10817:7c503938ce1d | 10818:04a0aa6d7e72 |
|---|---|
| 23 return true; | 23 return true; |
| 24 end | 24 end |
| 25 module:hook("iq-set/self/"..xmlns_carbons..":disable", toggle_carbons); | 25 module:hook("iq-set/self/"..xmlns_carbons..":disable", toggle_carbons); |
| 26 module:hook("iq-set/self/"..xmlns_carbons..":enable", toggle_carbons); | 26 module:hook("iq-set/self/"..xmlns_carbons..":enable", toggle_carbons); |
| 27 | 27 |
| 28 local function should_copy(stanza, c2s, user_bare) | 28 local function should_copy(stanza, c2s, user_bare) --> boolean, reason: string |
| 29 local st_type = stanza.attr.type or "normal"; | 29 local st_type = stanza.attr.type or "normal"; |
| 30 if stanza:get_child("private", xmlns_carbons) then | 30 if stanza:get_child("private", xmlns_carbons) then |
| 31 return false, "private"; | 31 return false, "private"; |
| 32 end | 32 end |
| 33 | 33 |