Skip to content

fix(backend): chat#296

Merged
1673beta merged 2 commits into
developfrom
fix/chat-1
Jul 4, 2026
Merged

fix(backend): chat#296
1673beta merged 2 commits into
developfrom
fix/chat-1

Conversation

@1673beta

@1673beta 1673beta commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Update CHANGELOG_CHERRYPICK.md
  • (If possible) Add tests

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens ActivityPub chat federation handling to prevent authority confusion between local and remote chat rooms by introducing canonical room identity (URI/host) and updating inbox handlers and federation payloads accordingly, with regression tests.

Changes:

  • Add uri and host columns to chat_room and use them to resolve rooms safely in ActivityPub inbox flows.
  • Update chat federation rendering/sending to prefer the room’s canonical federation URI.
  • Add unit regression tests covering cross-host spoofing, invitation requirements, and membership removal behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/backend/test/unit/ApInboxService.ts Adds regression tests for chat federation authority/authorization edge cases.
packages/backend/src/models/ChatRoom.ts Introduces uri/host columns and indexes for canonical remote-room identity.
packages/backend/src/core/ChatService.ts Uses canonical room URI when emitting federation activities.
packages/backend/src/core/activitypub/ApRendererService.ts Switches group-chat context and room object IDs to use canonical room URI when present.
packages/backend/src/core/activitypub/ApInboxService.ts Adds safe room resolution by host/uri and enforces invitation/host checks in chat inbox handlers.
packages/backend/migration/1783194302667-AddChatRoomUriHost.js Adds DB columns/indexes for room uri/host.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/backend/migration/1783194302667-AddChatRoomUriHost.js
Comment thread packages/backend/migration/1783194302667-AddChatRoomUriHost.js
Comment thread packages/backend/src/models/ChatRoom.ts
Comment thread packages/backend/src/models/ChatRoom.ts
Comment thread packages/backend/src/models/ChatRoom.ts
Comment thread packages/backend/src/models/ChatRoom.ts
Comment thread packages/backend/src/core/ChatService.ts
Comment thread packages/backend/src/core/ChatService.ts
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

이 PR에 의한 api.json 차이
차이점이 없습니다.
Get diff files from Workflow Page

@1673beta 1673beta merged commit cf4b74f into develop Jul 4, 2026
34 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants