Kim Alvefur
7e181e31e0
moduleapi: Fix handling of replies to :send_iq from internal modules
...
Unclear exactly why, but replies to some queries to local modules would
be discarded by stanza_router. This appears to fix it.
2020-03-22 22:32:26 +01:00
Kim Alvefur
3db27c3696
core.moduleapi: Hook correct event type in some cases
...
In rare cases, module.host can be a bare JID, in which case this test
did the wrong thing.
2020-01-16 16:30:26 +01:00
Kim Alvefur
adc4440fd8
core.moduleapi: Rename local name for util.error for consistency
...
It's called 'errors' everywhere else except here.
2019-12-30 09:54:49 +01:00
Kim Alvefur
cdd6144dcc
core.moduleapi: Fix error context in :send_iq API
...
It got passed as argument to reject() instead of the util.error
function and was lost.
2019-12-30 09:53:10 +01:00
Kim Alvefur
e0125bcb4c
core.moduleapi: Restructure send_iq method for more atomic cleanup
...
All cleanup in one spot instead of two, and at the end which fits with
cleanup happening afterwards.
2019-08-21 23:18:08 +02:00
Kim Alvefur
2dd7b57175
core.moduleapi: Uppercase "IQ stanza" for consistency
...
It's written like that elsewhere in the send_iq method
2019-08-21 23:15:05 +02:00
Matthew Wild
36ad587977
moduleapi: Log suppressed status priority and message when not overriding
2019-03-26 17:22:56 +00:00
Matthew Wild
3616d69edb
moduleapi: Remove overly-verbose debug logging on module status change
2019-03-26 17:22:25 +00:00
Matthew Wild
23577330fd
moduleapi: New API for modules to set a status
2019-03-19 09:04:40 +00:00
Kim Alvefur
a89dd30b7e
core.moduleapi: Use convenience function for creating error object from stanza
2018-12-30 20:35:20 +01:00
Kim Alvefur
f102941562
core.moduleapi: Use util.error for :send_iq errors
2018-12-30 16:03:15 +01:00
Kim Alvefur
0fe56344ca
core.moduleapi: Move util imports to top
2018-12-30 14:26:58 +01:00
Kim Alvefur
f017415def
core.moduleapi: Add a promise-based API for tracking IQ stanzas ( fixes #714 )
2018-12-28 20:51:31 +01:00
Kim Alvefur
c899c8d357
moduleapi: Use pack from util.table
2018-12-08 16:35:00 +01:00
Kim Alvefur
fb6abdb161
moduleapi: Prevent loading disabled module as dependency of enabled one
...
Explicitly disabled module should stay disabled.
2018-10-25 17:11:10 +02:00
Kim Alvefur
2de254acf7
core.moduleapi: Remove redundant condition
2018-10-18 00:49:29 +02:00
Matthew Wild
10fe4432f4
moduleapi: Remove multiple-parameters feature from module:shared()
...
Multiple paths are rarely used, and leads to less clear code than just
calling module:shared() once per shared table. It also prevents us from
extending the API with new parameters in the future.
2018-08-08 08:19:01 +01:00
Kim Alvefur
c86e5f565c
moduleapi: Use :send API from :broadcast for compactness
2018-07-14 21:25:34 +02:00
Kim Alvefur
b58c44e43a
moduleapi: Lazy-load statsmanager on demand
2018-07-07 21:55:18 +02:00
Kim Alvefur
5884db59cc
moduleapi: Lazy-load configmanager on demand simplify dependency graph
2018-07-07 21:55:00 +02:00
Kim Alvefur
61c6bb76de
moduleapi: Remove unused and undocumented :has_feature and :has_identity
2018-02-23 17:11:59 +01:00
Kim Alvefur
9526273a1b
moduleapi: Warn if a module being loaded as a dependency has been disabled
2017-12-27 00:42:57 +01:00
Kim Alvefur
3e5d5895f9
Merge 0.10->trunk
2017-03-16 23:49:27 +01:00
Kim Alvefur
911bea7746
core.moduleapi: Factor out code for getting a scalar config option
2017-03-15 15:07:16 +01:00
Kim Alvefur
ca65f0d2d3
Merge 0.10->trunk
2017-03-06 01:14:32 +01:00
Kim Alvefur
1ecc3a7918
core: Split some very long lines [luacheck]
2017-03-04 17:49:48 +01:00
Matthew Wild
37913e5ce8
Merge 0.10->trunk
2016-08-31 16:25:21 +01:00
Matthew Wild
e2dbea53b4
moduleapi: 'duration' became 'times'
2016-08-31 16:10:16 +01:00
Kim Alvefur
b22eef35d7
Merge 0.10->trunk
2016-04-07 13:36:58 +02:00
Kim Alvefur
bb95b569ef
moduleapi: Allow an origin session to be passed to module:send()
2016-04-06 21:29:30 +02:00
Kim Alvefur
03bec1a290
Merge 0.10->trunk
2016-02-18 15:00:17 +01:00
Kim Alvefur
e349fb9c87
loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck]
2016-02-18 14:57:51 +01:00
Kim Alvefur
bad300a675
loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
2016-02-18 14:57:04 +01:00
Matthew Wild
ee4541c4d8
moduleapi: Silence luacheck warning about unused 'id' parameter
2016-02-05 00:10:27 +00:00
Matthew Wild
62e7b282ea
Merge 0.10->trunk
2016-02-05 00:04:11 +00:00
Kim Alvefur
2ab1810f7d
moduleapi: Add API method for getting a file path
2016-02-04 10:05:35 +01:00
Matthew Wild
11dcbc505b
Merge 0.10->trunk
2016-02-01 21:28:07 +00:00
Matthew Wild
a1e077c5e7
modulemanager, util.pluginloader: Move logic for locating some module libraries to pluginloader, to fix problems with non-filesystem errors being masked by the second load_code call
2016-02-01 21:26:15 +00:00
Kim Alvefur
6ef7c4d808
Merge 0.10->trunk
2015-08-20 13:05:22 +02:00
Matthew Wild
daec51c435
Merge 0.10->trunk
2015-05-06 19:26:53 +01:00
Matthew Wild
dfcb1b6c06
moduleapi: Import util.stanza required for module:broadcast()
2015-05-06 19:11:27 +01:00
Matthew Wild
a068b1d383
moduleapi: Add luacheck annotation
2015-05-06 19:02:44 +01:00
Matthew Wild
e5323b0c7f
moduleapi: Minor variable renaming to avoid clashes with the 'type' function
2015-05-06 19:02:07 +01:00
Matthew Wild
343f4f8c29
moduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks
2015-05-06 19:01:16 +01:00
Matthew Wild
07fcf555ba
moduleapi: module:measure_event(), module:measure_global_event(): Fix copy/paste error
2015-05-06 19:00:05 +01:00
Matthew Wild
aec67b444e
moduleapi: Remove accidental use of undefined and unnecessary 'priority' variable
2015-05-06 18:58:29 +01:00
Matthew Wild
1b81160835
moduleapi: Add module:broadcast() to send a stanza to a list of JIDs
2015-05-06 18:37:46 +01:00
Kim Alvefur
009cde88a5
Merge 0.10->trunk
2015-05-03 18:39:27 +02:00
Matthew Wild
b3965a9069
moduleapi: New methods for modules to conveniently wrap events
2015-04-28 14:18:43 +01:00
Matthew Wild
be7107c0ab
moduleapi: Experimental API for modules to measure the rate+duration of events
2015-04-28 13:52:07 +01:00