diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-02-02 19:29:17 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-02-02 19:29:17 +0000 |
commit | e98d142830919dbd1c817e249f363e9879d2d930 (patch) | |
tree | 880d1a6fd22b5545817e62898022772c6f9af8e7 /util | |
parent | 1f51b7920e1db51658e2b23704cc84ee4d0781c2 (diff) | |
download | prosody-e98d142830919dbd1c817e249f363e9879d2d930.tar.gz prosody-e98d142830919dbd1c817e249f363e9879d2d930.zip |
util.pubsub: Move service methods object creation (just code reorganisation)
Diffstat (limited to 'util')
-rw-r--r-- | util/pubsub.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index f606bdd8..ef905767 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -1,8 +1,7 @@ local events = require "util.events"; local cache = require "util.cache"; -local service = {}; -local service_mt = { __index = service }; +local service_mt = {}; local default_config = { itemstore = function (config, _) return cache.new(config["max_items"]) end; @@ -31,6 +30,11 @@ local function new(config) }, service_mt); end +--- Service methods + +local service = {}; +service_mt.__index = service; + function service:jids_equal(jid1, jid2) local normalize = self.config.normalize_jid; return normalize(jid1) == normalize(jid2); |