bluebubbles-helper icon indicating copy to clipboard operation
bluebubbles-helper copied to clipboard

Fix `scanMessage` Implementation

Open JUSTINMKAUFMAN opened this issue 1 year ago • 0 comments

The IMDDController.sharedInstance.scanMessage method, which is used to detect rich message content in text, is currently broken.

There are 3 problems:

  1. The completionBlock signature has changed and now takes 3 parameters (not 2).
  2. The scanMessage method now mutates the message you pass it directly, so you don't want to actually touch any of the completionBlock arguments like the code currently does.
  3. The call to send the message needs to be dispatched to the main thread to avoid crashing when exiting the completionBlock.

Tested on 2 instances running: [1] macOS 15.1.1 [2] macOS 15.2

Both instances serve high message volume (i.e. thousands of messages in/out across iMessage/SMS/RCS handles) and both have been working smoothly since yesterday.

JUSTINMKAUFMAN avatar Dec 31 '24 04:12 JUSTINMKAUFMAN