You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(poll): cast votes on native Messages polls (#148)
* feat(poll): add poll voting (cast a vote on a poll)
Adds `imsg poll vote` plus RPC `poll.vote` and the `send-poll-vote`
bridge action, so the CLI can cast a vote on an existing native Messages
poll. The vote is an associated message (associatedMessageType 4000, bare
poll GUID) carrying the Polls balloon payload.
Key detail: macOS 26 exposes no IMMessage initializer that carries a
balloon payload AND an associated message together, so the vote is built
with the associated-message initializer (the path reactions use, which
persists the association) and the balloonBundleID/payloadData are then
stamped onto the message's backing item.
Option selection resolves a 1-based index or option text to the stable
optionIdentifier via a new `MessageStore.pollOptions(guid:)`, and the
resolved option label is returned so callers can suppress a redundant
text reply that merely restates the vote.
* fix: harden native poll voting
* feat: expose poll vote bridge capability
---------
Co-authored-by: Omar Shahine <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
### Send
6
6
- fix: thread attributed-text formatting through the RPC `send` bridge path, not just `send-rich`, so direct/handle sends render **bold**/*italic*/etc. on macOS 15+. `handleSend` now forwards format ranges to the bridge, accepting `formatting` (the key OpenClaw's `message` tool emits) alongside `text_formatting`/`textFormatting` (#143, thanks @omarshahine).
7
+
- feat: add bridge-backed native poll voting through `imsg poll vote`, `poll.vote`, and `messages.poll.vote` (#148, thanks @omarshahine).
Class messageClass = NSClassFromString(@"IMMessage");
1646
+
SEL sel = @selector(initWithSender:time:text:messageSubject:fileTransferGUIDs:flags:error:guid:subject:associatedMessageGUID:associatedMessageType:associatedMessageRange:messageSummaryInfo:);
Class messageClass = NSClassFromString(@"IMMessage");
2811
+
if (!messageClass) returnnil;
2812
+
2813
+
// No macOS 26 IMMessage initializer carries balloon + payload AND
2814
+
// association together (verified by selector probe). Reactions prove the
2815
+
// associated-message initializer persists association atomically, and
2816
+
// balloon/payload set on the backing IMMessageItem persist (verified: an
2817
+
// earlier item-first vote landed with the balloon intact, only the
2818
+
// association — set via the wrap — was lost). So: init with association
2819
+
// atomically, then stamp balloonBundleID + payloadData onto the message's
2820
+
// own backing item (a real item from a direct init, not the transient one
2821
+
// the messageFromIMMessageItem: wrap returns).
2822
+
SEL sel = @selector(initWithSender:time:text:messageSubject:fileTransferGUIDs:flags:error:guid:subject:associatedMessageGUID:associatedMessageType:associatedMessageRange:messageSummaryInfo:);
2823
+
if (![messageClass instancesRespondToSelector:sel]) returnnil;
0 commit comments