Software /
code /
prosody
Comparison
plugins/mod_pep.lua @ 10066:216ae100c04a
mod_pep: Only log when creating new pubsub services
Once upon a time get_pep_service() would get called with random bare
JIDs and remote hostnames, which is why it was logged this way. This
seems to have been fixed, so it's not as useful anymore. It's still
useful to know when it creates a new service object.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 09 Jul 2019 15:12:32 +0200 |
parent | 10047:177a8b92204b |
child | 10521:cbb2c3f8bb1d |
comparison
equal
deleted
inserted
replaced
10065:b399dca1273c | 10066:216ae100c04a |
---|---|
181 end | 181 end |
182 end | 182 end |
183 end | 183 end |
184 | 184 |
185 function get_pep_service(username) | 185 function get_pep_service(username) |
186 module:log("debug", "get_pep_service(%q)", username); | |
187 local user_bare = jid_join(username, host); | 186 local user_bare = jid_join(username, host); |
188 local service = services[username]; | 187 local service = services[username]; |
189 if service then | 188 if service then |
190 return service; | 189 return service; |
191 end | 190 end |
191 module:log("debug", "Creating pubsub service for user %q", username); | |
192 service = pubsub.new({ | 192 service = pubsub.new({ |
193 pep_username = username; | 193 pep_username = username; |
194 node_defaults = { | 194 node_defaults = { |
195 ["max_items"] = 1; | 195 ["max_items"] = 1; |
196 ["persist_items"] = true; | 196 ["persist_items"] = true; |