nextcloud / assistant

✨ Nextcloud Assistant
GNU Affero General Public License v3.0
23 stars 4 forks source link

Update to v1.1.0 makes it disappear button "Create Talk room for this event" in Calendar event creation #92

Closed fabiorasta closed 3 weeks ago

fabiorasta commented 1 month ago

Which version of assistant are you using?

1.0.9

Which version of Nextcloud are you using?

29.0.2

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Firefox 127

Describe the Bug

After updating to version 1.1.0 of the Assistant AI app, I noticed that, when creating a new calendar event (in the Calendar app), the "Create Talk room for this event" button was no longer available (in the section where the user invites participants). By reinstalling the previous version, i.e. 1.0.9, everything goes back to normal.

Expected Behavior

I expect that with the update to version 1.1.0 of the Assistant AI app, the creation of a new calendar event (in the Calendar app) will not be affected, i.e. that the "Create Talk room for this event" button will remain available

To Reproduce

Update to version 1.1.0 the Assistant AI app. Create a new calendar event (in the Calendar app). You will notice that the "Create Talk room for this event" button was no longer available (in the section where the user invites participants).

julien-nc commented 3 weeks ago

Thanks for reporting this.

So, Calendar is getting a wrong information about Talk being enabled or not. I narrowed it down to this:

https://github.com/nextcloud/assistant/blob/main/lib/Listener/BeforeTemplateRenderedListener.php#L48

Without this line everything is fine. Weird thing is that when checking which value is provided to the frontend, it is always correct there: https://github.com/nextcloud/calendar/blob/main/lib/Controller/ViewController.php#L121 Then I found this:

https://github.com/nextcloud/calendar/blob/main/lib/Listener/CalendarReferenceListener.php#L96

The assistant is dispatching the RenderReferenceEvent event because the chattyUI might need to resolve and render link previews. But when Calendar receives RenderReferenceEvent, it wants its frontend to consider that Talk is disabled (probably just to avoid having the "create talk room" button in link previews). So Calendar considers that RenderReferenceEvent is never dispatched when loading the main Calendar app page.

I think this is a Calendar issue. Wdyt @miaulalala @hamza221 ?

hamza221 commented 3 weeks ago

Then I found this:

https://github.com/nextcloud/calendar/blob/main/lib/Listener/CalendarReferenceListener.php#L96

This was implemented for widget creation in (talk, text ...) It is indeed a Calendar issue , feel free to transfer it to the calendar repo, I'll take over.

tcitworld commented 3 weeks ago

Related to https://github.com/nextcloud/calendar/issues/6076