Skip to content
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

FEATURE: closed events #564

Merged
merged 1 commit into from
May 14, 2024
Merged

FEATURE: closed events #564

merged 1 commit into from
May 14, 2024

Conversation

ZogStriP
Copy link
Member

@ZogStriP ZogStriP commented May 13, 2024

Adds support for "closed" events instead of just relying on the start & end dates.

An event will be "expired" when it happened in the past.

An event might now also be "closed", if for whatever reasons, the author decides to "cancel" it.

Context - https://meta.discourse.org/t/when-closing-event-it-moves-it-to-todays-date-time/307292

@@ -2,33 +2,34 @@

module DiscoursePostEvent
class EventSerializer < ApplicationSerializer
attributes :id
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just sorted alphabetically all the attributes.

Only added "is_closed"

];

if (
attrs.eventModel.is_expired &&
attrs.eventModel.status !== "standalone"
eventModel.is_expired &&
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensures we only show participants when the event was not "standalone" nor closed.

spec/system/post_event_spec.rb Outdated Show resolved Hide resolved
spec/system/post_event_spec.rb Outdated Show resolved Hide resolved
Adds support for "closed" events instead of just relying on the start & end dates.

An event might now be "expired" when it happened in the past.

An event might now also be "closed", if for whatever reasons, the author decides to "cancel" it.

Context - https://meta.discourse.org/t/when-closing-event-it-moves-it-to-todays-date-time/307292
@ZogStriP ZogStriP merged commit acb0681 into main May 14, 2024
5 checks passed
@ZogStriP ZogStriP deleted the closed-events branch May 14, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants