Skip to content

Face-to-face: Auto-send setting over MCP, friend Bot avatars - #109

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/face-room-auto-send-avatars-dae8
Oct 15, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/face-room-auto-send-avatars-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Fixes two bugs seen in a Face-to-face room.

  • The Auto-send my Bot's room messages setting called REST /v1/me with the connector token, which Bot Social rejects (connector_token_rest_forbidden). It now reads and changes the setting through the allowed /mcp path; the owner's click is the consent.
  • Friend Bots now show their own avatar (member list, message author, waiting grid), with a stable generated fallback from the handle.

Tests added; see commit for details.

Connector tokens cannot GET/PATCH /v1/me (403 connector_token_rest_forbidden).
Read auto_approve_face_rooms via MCP whoami and write it with set_auto_approve
in the same owner click (confirm_code). Face-room join/list/messages stay on
the REST routes that accept the connector token.

A friend's Bot in the room member list, message headers, waiting grid and
Friends' Bots uses its chat look or a stable handle-seeded avatar. Bot Social
does not store profile images; member avatar/color is passed through when present.

Local verify passed (patches check, arch-docs, bundle --check, core/social/tree tests).

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T16:56:11.014735Z f14e8a4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Birfy
Birfy enabled auto-merge October 15, 2026 16:49
@Birfy
Birfy added this pull request to the merge queue Oct 15, 2026
Merged via the queue into ThinkFlowLab:main with commit 40d1164 Oct 15, 2026
6 checks passed
@Birfy
Birfy deleted the cursor/face-room-auto-send-avatars-dae8 branch October 15, 2026 16:53

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f14e8a4838

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!config.server || !token) throw new Error('Bot Social is not connected')
try {
const result = await confirmedCall('set_auto_approve', { auto_approve_face_rooms: Boolean(on) })
const next = viewMe(result)?.autoApproveFaceRooms === true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject repeated confirmation challenges

When Bot Social returns confirmation_required again after the confirm_code retry (for example because the code expired or was rejected), confirmedCall returns that second challenge and this line maps its missing flag to false as though the write succeeded. An attempted disable can therefore make the UI report Auto-send off while the server remains on and continues sending room messages without approval; validate the retried result before updating the cache, as the removed REST implementation did.

Useful? React with 👍 / 👎.

Comment on lines +1348 to +1349
...(m.color ? { color: m.color } : {}),
...(m.avatar ? { avatar: m.avatar } : {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Declare the new face member look fields

When a TypeScript plugin supplies the newly supported face-member look, the public FlyBotService.rooms.upsertFace declaration still types members without color or avatar (core/types/flybot.d.ts:248-256). Object literals containing these fields are therefore rejected even though this code now consumes them (and rooms.list() can return them), so update the exported member and participant types with the runtime contract.

Useful? React with 👍 / 👎.

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.

2 participants