From 3e4dbe84c8afd9e2293d22721571f1b97d2ee993 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Mon, 26 Oct 2026 19:45:37 +0000 Subject: [PATCH] Add audio attachments --- json.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/json.go b/json.go index 9aad6ee..a65e2a4 100755 --- a/json.go +++ b/json.go @@ -197,6 +197,7 @@ const ( Location attachmentType = "location" Emoji attachmentType = "emoji" Video attachmentType = "video" + Audio attachmentType = "audio" File attachmentType = "file" Reply attachmentType = "reply" // Poll only carries PollID; the details are in the message's poll.created Event. @@ -220,6 +221,12 @@ type Attachment struct { BaseReplyID ID `json:"base_reply_id,omitempty"` UserID ID `json:"user_id,omitempty"` PollID string `json:"poll_id,omitempty"` + + // Duration is in seconds. Peaks holds normalized waveform samples, which + // GroupMe clients send either as a JSON array or as a string containing one. + Duration float64 `json:"duration,omitempty"` + Peaks json.RawMessage `json:"peaks,omitempty"` + TranscriptURL string `json:"transcript_url,omitempty"` } func (a *Attachment) String() string {