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 | c9dcb71c68bc3e0e55446aa48f422889c13433e1 (patch) | |
tree | 880d1a6fd22b5545817e62898022772c6f9af8e7 | |
parent | 2881279d6b4ecd3af2afb62e31bb36c8ab54a9e0 (diff) | |
download | prosody-c9dcb71c68bc3e0e55446aa48f422889c13433e1.tar.gz prosody-c9dcb71c68bc3e0e55446aa48f422889c13433e1.zip |
util.pubsub: Move service methods object creation (just code reorganisation)
-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); |