Repository navigation
Send video dimensions when starting a GroupMe upload - #32
Conversation
|
1 potential issue found:
↑ Select any checkbox above to have Indent auto-fix the issue
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
# Conflicts: # pkg/connector/mediainfo.go
# Conflicts: # pkg/connector/capabilities.go # pkg/connector/mediainfo.go
# Conflicts: # go.mod # go.sum # pkg/connector/capabilities.go # pkg/connector/handlematrix.go
GroupMe's live DM events carry an audio attachment's peaks as a bare "0.0,0.125,..." string rather than the bracketed form groups use, so DM voice notes arrived without a waveform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| content := msg.Content | ||
| portalType, gmid := ParsePortalID(msg.Portal.ID) | ||
| if gmid == "" || (portalType != PortalTypeGroup && portalType != PortalTypeDM) { | ||
| return nil, fmt.Errorf("invalid GroupMe portal") |
There was a problem hiding this comment.
🟡 Bug · Plain audio files are sent as voice notes and lose their caption
Every event.MsgAudio is routed to uploadMatrixMedia → voiceNoteAttachment, whether or not the event has MSC3245Voice. Before the voice-note work, a plain audio file (e.g. an .mp3 with a caption) failed with ErrUnsupportedMessageType and the sender got an unsupported notice. Now it uploads with Extension "mp3" and arrives in GroupMe as a voice note, and the case event.MsgAudio: text = "" branch drops the caption silently. Capabilities only advertise CapMsgVoice with audio/mp4, so plain audio is outside the declared contract.
Handle MsgAudio as a voice note only when content.MSC3245Voice != nil; otherwise return ErrUnsupportedMessageType or send it as a file and keep the caption.
Found by Indent Review Agent
…nsions # Conflicts: # pkg/connector/handlematrix.go # pkg/groupmeext/message.go
|
Tested live on a self-hosted bridge (main vs this branch, retested after main was merged in): the upload now carries the dimensions - GroupMe stores the video as Web played fine on main too so the empty player only shows on GroupMe's mobile apps, still worth a device check but merging as the upload request now matches the web client. LGTM! |
Videos sent from Beeper reach GroupMe's own apps as an empty player, and Beeper shows them as a broken file. The roadmap lists this as "GroupMe can't play it back".
One thing we do differently from GroupMe's web client is the upload session request. The web client sends the video's dimensions, and we never do:
The video's width and height from the Matrix event now go into the upload session. To keep the call readable, the session fields are passed as one
UploadRequest.I haven't proven this fixes playback. It's the remaining difference between our upload and the web client's (apart from
blur_hash), so it needs a device check before the roadmap row changes.Changelog: Internal, until playback is confirmed on a device.
Before / after
I haven't run this on a device yet. It needs a staging bridge build, a video sent from Beeper, and a check that it plays in GroupMe's app.
Stacked on #31.
Tag
@indentto continue the conversation here.