Allow JIDs from all MUC light domains in HTTP room API
This PR allows passing room JID from all configured MUC light domains in HTTP room API routes. Previously the JID needed to be in a "primary" MUC light domain on host (started via mod_muc_light:start/2). If only username part of JID is given, still "primary" domain is assumed.
@arcusfelis @fenek in hope to address concerns of both of you, I propose to replace dirty_get_routes_to_module with dirty_check_route_exists/2 which would take a domain and a module as a parameter, and return true if a route to that domain handled by such module exists.
@arkgil dirty_check_route_exists/2 makes sense.
@arkgil
OK, sounds good. :) Also I think that dirty_is_route_handler_module/2 would be more accurate. dirty_get_route_handler_module/1 would be fine as well. :)
@fenek @arcusfelis I've added negative test cases and one test to ensure that rooms can be actually created at different domain. However I noticed that if we'd like to fully support running multiple MUC light services on a single host, couple of changes would need to be made, e.g.:
- drop the uniqueness constraint on room IDs and force uniqueness only in the scope of a single domain
- allow to start multiple instances of the same module attached to a single XMPP host served by Mongoose
What is the situation of this PR?