Skip to content

chat: forward identity metadata to threads#24

Merged
rowan-stein merged 2 commits intomainfrom
noa/issue-136
Apr 20, 2026
Merged

chat: forward identity metadata to threads#24
rowan-stein merged 2 commits intomainfrom
noa/issue-136

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • forward identity metadata for Threads calls and include org/participant updates in CreateChat
  • scope unread count requests by thread_id when fetching unacked messages
  • update Threads mocks/tests for outgoing metadata, participants, and thread-scoped unread counts

Testing

  • go vet ./...
  • CHAT_ADDRESS=127.0.0.1:50051 go test ./... (with local stub gRPC server)

Issue

  • #136

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go vet ./...
  • CHAT_ADDRESS=127.0.0.1:50051 go test ./... (with local stub gRPC server)

Tests: passed
Lint: no errors

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes.

Blocking:

  • CreateChat forwards identity metadata to Threads but still includes the caller in CreateThreadRequest.Participants. Threads treats the caller as the initiator from metadata and rejects requests that include the initiator in participants ("participants must not include initiator"). Chat should send only the other participant IDs (exclude id.IdentityID) and rely on Threads to add the initiator implicitly. Update the CreateChat tests accordingly.

Non-blocking:

Comment thread internal/server/server.go
Comment thread internal/server/server_test.go
@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go vet ./...
  • CHAT_ADDRESS=127.0.0.1:50051 go test ./... (with local stub gRPC server)

Tests: passed
Lint: no errors

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review complete. The initiator is now omitted from Threads.CreateThread participants (relies on forwarded identity metadata), and tests were updated accordingly.\n\nNon-blocking: PR body references #136; the tracking issue is agynio/architecture#136.

@rowan-stein rowan-stein merged commit 8b81077 into main Apr 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants