@@ -57,7 +57,7 @@ func (p *OrgBase) TargetID() *uuid.UUID {
5757
5858func (p * OrgBase ) ActionInfo () (json.RawMessage , error ) {
5959 if p .OrgName == "" || p .OrgID == nil {
60- return nil , errors .New ("user id and org name are required" )
60+ return nil , errors .New ("org name and org id are required" )
6161 }
6262
6363 return json .Marshal (& p )
@@ -79,6 +79,10 @@ func (p *OrgCreated) Description() string {
7979// user joined the organization
8080type OrgUserJoined struct {
8181 * OrgBase
82+ // UserID of the user that joined the organization
83+ UserID uuid.UUID `json:"user_id,omitempty"`
84+ // UserEmail of the user that joined the organization
85+ UserEmail string `json:"user_email,omitempty"`
8286}
8387
8488func (p * OrgUserJoined ) ActionType () string {
@@ -89,6 +93,14 @@ func (p *OrgUserJoined) Description() string {
8993 return fmt .Sprintf ("{{ .ActorEmail }} has joined the organization %s" , p .OrgName )
9094}
9195
96+ func (p * OrgUserJoined ) ActionInfo () (json.RawMessage , error ) {
97+ if p .OrgName == "" || p .OrgID == nil || p .UserID == uuid .Nil || p .UserEmail == "" {
98+ return nil , errors .New ("org name, org id, user id and user email are required" )
99+ }
100+
101+ return json .Marshal (& p )
102+ }
103+
92104// user left the organization
93105type OrgUserLeft struct {
94106 * OrgBase
0 commit comments