mattermost-community / mattermost-plugin-jitsi

Jitsi plugin for Mattermost :electric_plug:
Apache License 2.0
197 stars 90 forks source link

Meeting announcement created from ephemeral post doesn't post in RHS. #160

Open hanzei opened 3 years ago

hanzei commented 3 years ago

While testing https://github.com/mattermost/mattermost-plugin-jitsi/pull/158, I found one uncovered edge case: If the naming schema is set to ask, the ephemeral message generated when typing /jitsi start is correct posted in the RHS, but the following meeting isn't.

tw-ayush commented 3 years ago

So the meeting-id passed in as argument will get updated here

https://github.com/mattermost/mattermost-plugin-jitsi/blob/14107b6a514180ca0867761c0cba72bcc77518ac/server/plugin.go#L227

as jitsiNameSchemeAsk is not a case here.

do you think a new case should be added to it???

hanzei commented 3 years ago

That switch only takes care what meeting topic to use. I think my comment here should guide you into the right direction.

tw-ayush commented 3 years ago

Okay now this confuses me, the RootId is passed as empty string for both the cases and the code executes the same line/request for both the cases then what causes the problem here??

hanzei commented 3 years ago

https://github.com/mattermost/mattermost-plugin-jitsi/blob/14107b6a514180ca0867761c0cba72bcc77518ac/server/api.go#L232 is the line that get executed when a meeting is started after a naming schema was requested. Right now it simply uses an empty rootID. You need to store the rootID into the request context(https://github.com/mattermost/mattermost-plugin-jitsi/blob/d533d34c9b376b3b273b452f44d0fefeae46a7fd/server/api.go#L32) and then access it here.

tw-ayush commented 3 years ago

hey @hanzei this is only pending for merge.