Skip to content

Support macOS 15+ text formatting#766

Open
Nicell wants to merge 3 commits intoBlueBubblesApp:developmentfrom
Nicell:support-text-formatting
Open

Support macOS 15+ text formatting#766
Nicell wants to merge 3 commits intoBlueBubblesApp:developmentfrom
Nicell:support-text-formatting

Conversation

@Nicell
Copy link

@Nicell Nicell commented Jan 22, 2026

Adds support for basic text formatting (bold, italic, underline, strikethrough)

Pairs with BlueBubblesApp/bluebubbles-helper#50

This script:

const body = {
  chatGuid,
  message: "Bold Italic Underline Strike",
  method: "private-api",
  textFormatting: [
    { start: 0, length: 4, styles: ["bold"] },
    { start: 5, length: 6, styles: ["italic"] },
    { start: 12, length: 9, styles: ["underline"] },
    { start: 22, length: 6, styles: ["strikethrough"] }
  ]
};

fetch(`${baseUrl}/api/v1/message/text?password=${encodeURIComponent(password)}`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(body)
})

Resulted in:
image

Copy link
Member

@zlshames zlshames left a comment

Choose a reason for hiding this comment

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

Overall, this looks great! Thanks for doing all of the validation, min MacOS version, and what not, not only the endpoint & calls to the PAPI. Check out my comment, but that's the only comment I have. Obviously, this will need to be paired with a release for the PAPI bundle.

@Nicell Nicell changed the base branch from master to development January 22, 2026 17:09
@kate-jiang
Copy link

this and #768 are huge for my use case !! great work boys

@arimendelow
Copy link

@zlshames, looking for an update on this — would be an incredible unlock to have this :)

marktsears added a commit to Sprout-AI-Studio/bluebubbles-server that referenced this pull request Feb 19, 2026
Adds support for rich text formatting in iMessages on macOS Sequoia and newer.
Users can now send messages with bold, italic, underline, and strikethrough styles.

## API Usage

```json
POST /api/v1/message/text
{
  "chatGuid": "iMessage;-;+1234567890",
  "message": "Hello World!",
  "method": "private-api",
  "textFormatting": [
    { "start": 0, "length": 5, "styles": ["bold"] },
    { "start": 6, "length": 5, "styles": ["italic"] }
  ]
}
```

## New Types

- `TextFormattingStyle`: "bold" | "italic" | "underline" | "strikethrough"
- `TextFormattingRange`: { start: number, length: number, styles: TextFormattingStyle[] }
- `TextFormatting`: TextFormattingRange[]

## Validation

- Requires macOS Sequoia (15.0) or newer
- Automatically implies Private API method when formatting is present
- Cannot be combined with attributedBody
- Validates range bounds against message length
- Validates style values against allowed set

## Files Changed

- messageRouter.ts - Extract textFormatting from request body
- messageValidator.ts - Add validation rules and OS version check
- messageInterface.ts - Pass textFormatting through to Private API
- PrivateApiMessage.ts - Forward formatting data to helper
- types/index.ts - New type definitions
- TextFormattingUtils.ts - Validation utility functions (new file)

## Requirements

- macOS 15.0 (Sequoia) or newer
- Private API enabled
- Updated BlueBubblesHelper.dylib with formatting support

Sourced from upstream PR BlueBubblesApp#766 by Nicell.

Co-Authored-By: Nicell <nicell@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

4 participants