-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hooks rework #3174
Merged
Merged
Hooks rework #3174
Commits on Jul 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b5b25d5 - Browse repository at this point
Copy the full SHA b5b25d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32a68ff - Browse repository at this point
Copy the full SHA 32a68ffView commit details
Commits on Jul 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 10a116d - Browse repository at this point
Copy the full SHA 10a116dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f71a78 - Browse repository at this point
Copy the full SHA 8f71a78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8badc48 - Browse repository at this point
Copy the full SHA 8badc48View commit details -
allowing only external function references in gen_hook interfaces
for OTP versions prior to 23, local function references in format like fun some_fun/2 behave in the same way as anonymous functions. different places in code generate different references. in addition to that local fun references are not code-reload safe, so it’s better to use external fun references only. It's still a good idea to use function references, because it allows dialyzer to check the handler function specs.
Configuration menu - View commit details
-
Copy full SHA for 69f755c - Browse repository at this point
Copy the full SHA 69f755cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25d2679 - Browse repository at this point
Copy the full SHA 25d2679View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2404f2 - Browse repository at this point
Copy the full SHA b2404f2View commit details -
getting rid of ejabberd_hooks:run_fold/4 interface and converting a f…
…ew hooks used in testing
Configuration menu - View commit details
-
Copy full SHA for 75b93b1 - Browse repository at this point
Copy the full SHA 75b93b1View commit details
Commits on Jul 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2ec4c5d - Browse repository at this point
Copy the full SHA 2ec4c5dView commit details
Commits on Jul 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9e2d73c - Browse repository at this point
Copy the full SHA 9e2d73cView commit details
Commits on Jul 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2514a43 - Browse repository at this point
Copy the full SHA 2514a43View commit details -
changes according to the review comment.
This branch introduces initial rework of the hooks framework The key changes: * hook handler functions now have fixed number of arguments: - Acc - the same meaning as before - Parameters map - input parameters are now provided in a form of map instead of variable number of handler function arguments - Extra map - every hook handler now can have a static context, in the same way as packet handlers. This map is automatically extended with 'hook_name' and 'hook_tag' ('global' or HostType) parameters on hook registration, so there is no need to add HostType into Parameters map any more. * the old format of hook handlers is still supported (until the full conversion of all the hook handlers is done) * conversion of the hooks can be done hook by hook, the following steps must be done to convert the hook: - convert hook execution function at 'mongoose_hooks' module. - convert all the handlers of the hook (they must be registered using gen_hook interface instead of ejabberd_hook). - also, it's possible to mix old & new hook handlers formats (see example at mongoose_hooks:push_notifications/4). * note that 'gen_hook' accepts only external function references (in format "fun Module:Function/Arity', e.g. "fun erlang:is_function/1") as hook handler function parameter.
Configuration menu - View commit details
-
Copy full SHA for 43a4064 - Browse repository at this point
Copy the full SHA 43a4064View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9463958 - Browse repository at this point
Copy the full SHA 9463958View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.