From a0494aa90813ee88d77ca996282b116669e8ee4a Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Sun, 19 Nov 2023 16:44:02 -0500 Subject: [PATCH] Avoid using reserved keyword Text (#364) --- internal/email/reparse.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/email/reparse.go b/internal/email/reparse.go index 0f2ca9a0..8a6e8f0b 100644 --- a/internal/email/reparse.go +++ b/internal/email/reparse.go @@ -32,7 +32,10 @@ func Reparse(ctx context.Context, client api.ReparseEmailAPI, messageID string) Key: map[string]types.AttributeValue{ "MessageID": &types.AttributeValueMemberS{Value: messageID}, }, - UpdateExpression: aws.String("SET Text = :text, HTML = :html, Attachments = :attachments, Inlines = :inlines, OtherParts = :others"), + UpdateExpression: aws.String("SET #tx = :text, HTML = :html, Attachments = :attachments, Inlines = :inlines, OtherParts = :others"), + ExpressionAttributeNames: map[string]string{ + "#tx": "Text", + }, ExpressionAttributeValues: map[string]types.AttributeValue{ ":text": &types.AttributeValueMemberS{Value: emailResult.Text}, ":html": &types.AttributeValueMemberS{Value: emailResult.HTML},