Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIOS-756: Add room description to Linear issue if available #11

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,12 +989,15 @@ func (s *submitServer) buildReportBody(ctx context.Context, p parsedPayload, lis

var dataKeys, eventDataKeys []string
var eventSource string
var roomDescription string
for k := range p.Data {
switch k {
case "event_id", "room_id", "event_timestamp":
eventDataKeys = append(eventDataKeys, k)
case "decrypted_event_source":
eventSource = p.Data[k]
case "room_description":
roomDescription = p.Data[k]
default:
dataKeys = append(dataKeys, k)
}
Expand All @@ -1006,6 +1009,9 @@ func (s *submitServer) buildReportBody(ctx context.Context, p parsedPayload, lis
if eventSource != "" {
_, _ = fmt.Fprintf(&bodyBuf, "### Event source:\n\n```json\n%s\n```\n", eventSource)
}
if roomDescription != "" {
_, _ = fmt.Fprintf(&bodyBuf, "### Room description:\n\n```json\n%s\n```\n", roomDescription)
}
printDataKeys(p, &bodyBuf, "Data from app", dataKeys)

return &bodyBuf
Expand Down
Loading