Changeset 0.28.0.1 (#173)
This commit is contained in:
@@ -352,11 +352,12 @@ func TriggerWorkflowOnComplete(ctx context.Context, stores store.Stores, workflo
|
||||
|
||||
// Bind first stage persona
|
||||
if len(stages) > 0 && stages[0].PersonaID != nil {
|
||||
_, _ = database.DB.ExecContext(ctx, database.Q(`
|
||||
INSERT INTO channel_participants (channel_id, participant_type, participant_id)
|
||||
VALUES ($1, 'persona', $2)
|
||||
ON CONFLICT DO NOTHING
|
||||
`), ch.ID, *stages[0].PersonaID)
|
||||
_ = stores.Channels.AddParticipant(ctx, &models.ChannelParticipant{
|
||||
ChannelID: ch.ID,
|
||||
ParticipantType: "persona",
|
||||
ParticipantID: *stages[0].PersonaID,
|
||||
Role: "member",
|
||||
})
|
||||
}
|
||||
|
||||
log.Printf("[workflow] on_complete: started chained workflow %s → %s (channel %s)",
|
||||
|
||||
Reference in New Issue
Block a user