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

Add event code for group changes. #3612

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/group-changed-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Group feature changed event added

We added a group feature changed event.

https://github.com/cs3org/reva/pull/3612
20 changes: 20 additions & 0 deletions pkg/events/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,23 @@ func (GroupMemberRemoved) Unmarshal(v []byte) (interface{}, error) {
err := json.Unmarshal(v, &e)
return e, err
}

// GroupFeature represents a group feature
type GroupFeature struct {
Name string
Value string
}

// GroupFeatureChanged is emitted when a group feature was changed
type GroupFeatureChanged struct {
Executant *user.UserId
UserID string
kobergj marked this conversation as resolved.
Show resolved Hide resolved
Features []GroupFeature
kobergj marked this conversation as resolved.
Show resolved Hide resolved
}

// Unmarshal to fulfill unmarshaller interface
func (GroupFeatureChanged) Unmarshal(v []byte) (interface{}, error) {
e := GroupFeatureChanged{}
err := json.Unmarshal(v, &e)
return e, err
}