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

Activity feed: notify clients when an activity is created, updated or deleted #257

Merged

Conversation

martastain
Copy link
Member

@martastain martastain commented Jun 28, 2024

When an activity is created RT activity.created event is dispatched with a list of all affected entities. that should trigger cache invalidation of the activity feed.

image

Keep in mind, that sender matching will prevent originating browser tab receiving the message, so whoever creates the activity is responsible to invalidate their own cache.

Don't forget subscribing to activity.created topic.

(the same structure is used for activity.updated and activity.deleted topics

@martastain martastain linked an issue Jun 28, 2024 that may be closed by this pull request
@martastain martastain requested a review from Innders June 28, 2024 12:28
@martastain martastain added the type: enhancement Improvement of existing functionality or minor addition label Jun 28, 2024
@martastain martastain changed the title Activity feed: notify clients when a new activity is created Activity feed: notify clients when a new activity is created, updated or deleted Jun 28, 2024
@martastain martastain changed the title Activity feed: notify clients when a new activity is created, updated or deleted Activity feed: notify clients when an activity is created, updated or deleted Jun 28, 2024
@Innders
Copy link
Member

Innders commented Jun 28, 2024

A user can receive a message from a project they do not have access to.

image

@martastain
Copy link
Member Author

Hmmm. True, but there's not much they can do with that. As the message does not contain any data, just a bunch of IDs.

It would be nice to filter out messages by access rights tho. I could do that in the websocket module as i hold metadata of connected users. But i think that's out of the scope of this PR. creating a second issue for it.

@Innders
Copy link
Member

Innders commented Jun 28, 2024

As the message does not contain any data

projectName is sensitive

@martastain
Copy link
Member Author

Oh. Yes. I'll start working on it.

@martastain martastain merged commit 0f1ce6c into develop Jun 28, 2024
@martastain martastain deleted the 237-activity-feed-ws-message-on-new-activity-feed-item branch June 28, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activity Feed: WS message on new activity feed item
2 participants