aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/pubsub.lua8
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);