MongooseIM icon indicating copy to clipboard operation
MongooseIM copied to clipboard

Allow JIDs from all MUC light domains in HTTP room API

Open arkgil opened this issue 8 years ago • 5 comments

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.

arkgil avatar Jan 03 '18 08:01 arkgil

@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 avatar May 07 '18 08:05 arkgil

@arkgil dirty_check_route_exists/2 makes sense.

arcusfelis avatar May 07 '18 13:05 arcusfelis

@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. :)

fen-pl avatar May 07 '18 15:05 fen-pl

@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

arkgil avatar May 08 '18 11:05 arkgil

What is the situation of this PR?

Neustradamus avatar Jul 30 '22 20:07 Neustradamus