room._data.meetingId is null - Module ordering

Module hooks are running concurrently.

mod_muc_meeting_id component is running after the component which using meeting_id. So meeting_id is coming null.

I have to load the modules in order. Does anyone have a solution ?

module:hook takes an optional priority param which defaults to 0. Higher priority runs first. Values can be negative.

Since mod_muc_meeting_id sets room._data.meetingId by hooking to muc-room-created with default priority, you could use a -ve priority in your event handlers to ensure it always runs after meetingId is set. E.g.

module:hook("muc-room-created", handle_room_created, -1);

Thanks for your answer.

I checked it, but priorities are correct.

Which module are you seeing a null meetingId? Is it a custom module?

Not sure how much I can help. But I am curious.

It is a custom module to collect metrics. Like, after the participant joined the meeting send post request to API.

Problem solved after prosody service restart. I don’t know how it solved, it is working now.