Skip to content

Commit

Permalink
fix: implement proper thread ID handling for activities
Browse files Browse the repository at this point in the history
  • Loading branch information
aliraza556 committed Feb 12, 2025
1 parent e7bef6b commit 1716fe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func (db database) CreateActivity(activity *Activity) (*Activity, error) {
if activity.ID == uuid.Nil {
activity.ID = uuid.New()
}

if activity.ThreadID == uuid.Nil {
activity.ThreadID = activity.ID
activity.Sequence = 1
}

if activity.Actions == nil {
activity.Actions = []string{}
Expand Down

0 comments on commit 1716fe4

Please sign in to comment.