From 7bf15cce481c4dc2d2ce294054c9c5c799b56926 Mon Sep 17 00:00:00 2001 From: Frederick Holland Date: Sun, 19 Oct 2025 19:16:41 +1100 Subject: [PATCH] Added UserId to participant model --- models/gencloud.go | 1 + models/participant.go | 1 + util/extract.go | 7 ++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/models/gencloud.go b/models/gencloud.go index 8a1fee3..ee9237e 100644 --- a/models/gencloud.go +++ b/models/gencloud.go @@ -72,6 +72,7 @@ type AnalyticsConversationWithoutAttributes struct { DivisionIds []string `json:"divisionIds"` Participants []struct { ParticipantId string `json:"participantId"` + UserId string `json:"userId"` ParticipantName string `json:"participantName"` Purpose string `json:"purpose"` ExternalContactId string `json:"externalContactId"` diff --git a/models/participant.go b/models/participant.go index 2da5aee..86c0ce3 100644 --- a/models/participant.go +++ b/models/participant.go @@ -17,6 +17,7 @@ type DBParticipant struct { Name *string `gorm:"index"` Purpose *string `gorm:"index"` QueueId *string + UserId *string Wrapup *string `gorm:"type:json"` WrapupExpected *bool WrapupRequired *bool diff --git a/util/extract.go b/util/extract.go index dd4d997..dc4e022 100644 --- a/util/extract.go +++ b/util/extract.go @@ -49,13 +49,14 @@ func ExtractWithoutAttributes(base models.AnalyticsConversationWithoutAttributes for _, p := range base.Participants { participant := models.DBParticipant{ - ConnectedTime: nil, - ConversationId: base.ConversationId, - EndTime: nil, + // ConnectedTime: nil, + ConversationId: base.ConversationId, + // EndTime: nil, ExternalContactId: &p.ExternalContactId, Id: p.ParticipantId, Name: &p.ParticipantName, Purpose: &p.Purpose, + UserId: &p.UserId, } participants = append(participants, participant)