fix: hydrate meeting note file uploader

This commit is contained in:
richjohnrambo
2026-09-21 11:02:36 +08:00
parent 06e3f0b489
commit 53accc3e3f
4 changed files with 64 additions and 5 deletions
+22
View File
@@ -115,6 +115,28 @@ func TestMeetingNoteFilePayloadKeepsOriginalNameAndExtension(t *testing.T) {
}
}
func TestMeetingNoteFilePayloadUsesUploaderSummary(t *testing.T) {
now := time.Date(2026, 9, 17, 12, 0, 0, 0, time.UTC)
payload := meetingNoteFilePayload(store.MeetingNoteFile{
NoteFileID: "mnote_1",
UploaderID: 1573637795346386944,
Uploader: store.UserSummary{
UserID: 1573637795346386944,
DisplayName: "jcharles3",
},
Status: "active",
CreatedAt: now,
UpdatedAt: now,
}, 1573637795346386944)
uploader, ok := payload["uploader"].(map[string]any)
if !ok {
t.Fatalf("uploader=%#v", payload["uploader"])
}
if uploader["display_name"] != "jcharles3" {
t.Fatalf("uploader.display_name=%v, want jcharles3", uploader["display_name"])
}
}
func assertNoNumericUserIDs(t *testing.T, value any) {
t.Helper()
switch typed := value.(type) {