Skip to content

📅 Handling of event conversations - ⚙️ API - Follow up #14689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
miaulalala opened this issue Mar 19, 2025 · 7 comments · Fixed by #14713
Closed

📅 Handling of event conversations - ⚙️ API - Follow up #14689

miaulalala opened this issue Mar 19, 2025 · 7 comments · Fixed by #14713
Assignees
Labels
3. to review feature: api 🛠️ OCS API for conversations, chats and participants feature: conversations 👥
Milestone

Comments

@miaulalala
Copy link
Contributor

miaulalala commented Mar 19, 2025

Follow up to #14402

Imagine a use case where I create a room that is an object type event, and then re- use it for a second event by choosing it from the calendar dropdown.

The following scenarios are possible:

  • the initial event is in the past
  • the initial event happens before the additional event
  • the initial event happens after the additional event
  • the initial event has a recurrence
  • the additional event has a recurrence

In most cases, the listener would update the timestamp without checking to see which event is closer to the present.
We also don't keep track of additional events, and we don't handle events with recurrences.

Solution 1: Filter the room list in the Calendar app to only show non- event type rooms

Solution 2: check the above items in the listener and make sure to always use the closest timestamp. This would mean that the event room might be deleted even though it's still in use in a different event, which is also not great.

@miaulalala miaulalala added 0. Needs triage feature: api 🛠️ OCS API for conversations, chats and participants labels Mar 19, 2025
@miaulalala miaulalala added this to the ⛰️ Summit milestone Mar 19, 2025
@miaulalala miaulalala self-assigned this Mar 19, 2025
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💬 Talk team Mar 19, 2025
@miaulalala
Copy link
Contributor Author

It would be possible to filter the rooms from this modal in Calendar:

Image

@ChristophWurst is that a change you would be ok with?

@ChristophWurst
Copy link
Member

the listener would update the timestamp

Which listener?

@miaulalala
Copy link
Contributor Author

the listener would update the timestamp

Which listener?

The Talk internal listener https://github.com/nextcloud/spreed/blob/main/lib/Listener/CalDavEventListener.php

@ChristophWurst
Copy link
Member

I see. What does it do? It sets room meta data to the event start? And if there is more than one event pointing to the same room the start becomes ambiguous?
Do you get the same inconsistency when an attendee moves their copy of an event?

@miaulalala
Copy link
Contributor Author

miaulalala commented Mar 19, 2025

I see. What does it do? It sets room meta data to the event start?

Yes, exactly. We want to reduce the items in the room list since we have quite some power users that have hundreds, if not thousands of rooms that are "single use" for a calendar event, so we filter out those types of rooms until we're closer to their start date.

And if there is more than one event pointing to the same room the start becomes ambiguous?

Exactly.

Do you get the same inconsistency when an attendee moves their copy of an event?

Currently, we don't since we simply overwrite the timestamp when it's a CalendarObjectUpdatedEvent. If we change the listener, we would produce an ambiguity for this use case instead (which is probably the more common one).

Which is why I would prefer if we could filter rooms that have an objectType event from the modal in calendar so they can't be chosen. Of course, nothing prevents a user from copy- pasting a conversation link to the location field, so some checks might still be needed... maybe a search for the LOCATION property on the CalDavBackend, which, if there's already an event with this link, would change the room type since it doesn't adhere to the constraints of a room type event.

@SystemKeeper
Copy link
Contributor

Some points from our discussion:

  • Rooms with recurrences should be converted to regular rooms in the CalDAV listener (as they are not a "disposable room")
  • Check if the objectId is already a timestamp in CalDAV listener on creation, if it is, convert it to a regular room, because then we have 2 instances of usage. Don't do that, on update: On Update do a search instead.
  • On frontend/clients, event rooms should not be able to change the title and description (as this should be updated by the CalDAV listener as well). You can change avatar in talk.
  • We replace the calendar icon inside of the chat for event rooms (in the topbar) with a symbol that indicates that this room will be archived after 24h and actions. The actions should be in the menu, where we currently have "Schedule meeting".
  • On frontend: Hide room type EVENT if object id is smaller (timestamp - 3600 * 24)
  • On API: Archive room type EVENT if the last activty timestamp is (current - 3600*24*7) - i. e. if they haven't been used for a week and no new messages were sent
  • When a call ends in the room type EVENT, show buttons to archive / delete the room immediately - similar to green "join call" button we have now in the chat area

Considerations:

  • Deleting and restoring of calendar events changing the status
  • Copying events are currently not handled

@miaulalala
Copy link
Contributor Author

miaulalala commented Mar 24, 2025

To Do Development CalDavListener:

  • Split CalendarObjectCreated and CalendarObjectUpdated events to handle the difference with timestamps / search
  • Search should compare UUID
  • Update Title and Description from the Listener (for rooms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review feature: api 🛠️ OCS API for conversations, chats and participants feature: conversations 👥
Projects
Status: ☑️ Done
Development

Successfully merging a pull request may close this issue.

3 participants