Mark the lead's messages and answers as the lead's, not the human's
This commit is contained in:
@@ -185,7 +185,7 @@ func insertResponse(ctx context.Context, tx *sql.Tx, resp api.InboxResponse) err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, `
|
||||
INSERT INTO inbox_responses (id, item_id, user_login, type, options, text, images, attachments, created_at)
|
||||
INSERT INTO inbox_responses (id, item_id, actor, type, options, text, images, attachments, created_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`, resp.Id, resp.ItemId, resp.User, string(resp.Type), options, resp.Text, string(images), string(attachments), formatTime(resp.CreatedAt))
|
||||
return err
|
||||
@@ -392,7 +392,7 @@ func getItem(ctx context.Context, q querier, id string) (api.InboxItem, error) {
|
||||
|
||||
func getResponses(ctx context.Context, q querier, itemID string) ([]api.InboxResponse, error) {
|
||||
rows, err := q.QueryContext(ctx, `
|
||||
SELECT id, item_id, user_login, type, options, text, images, attachments, created_at, delivered_at, snapshot_n
|
||||
SELECT id, item_id, actor, type, options, text, images, attachments, created_at, delivered_at, snapshot_n
|
||||
FROM inbox_responses WHERE item_id = ? ORDER BY created_at
|
||||
`, itemID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user