fix(linkedin): preserve multiline safe-send messages#1817
Open
gauravsaxena1997 wants to merge 1 commit into
Open
fix(linkedin): preserve multiline safe-send messages#1817gauravsaxena1997 wants to merge 1 commit into
gauravsaxena1997 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes LinkedIn
safe-sendflattening multiline messages before they reach the LinkedIn composer.The command previously validated
--messagethroughnormalizeWhitespace(...)and then reused that normalized value for sending. That made messages with paragraphs, numbered answers, or bullet lists arrive at the composer as a single line. The composer then had no chance to preserve user-intended formatting.Why this matters
linkedin safe-sendis commonly used for careful human-approved outreach and replies. Those messages often need readable structure:Flattening everything into one paragraph is hard to read and makes approved messages look less professional, especially for recruiter or lead replies.
What changed
--messagestring after validating that it is non-empty.\nor\r.<br>nodes and input events.page.insertText(...)path for single-line messages.Safety model
This does not relax the existing write safety boundaries:
--send trueThe main change is that validation no longer destroys formatting before insertion.
Validation
npm run test:adapter -- clis/linkedin/safe-send.test.jsnpm run typechecknpm run test:adapterFull adapter suite result: 379 files passed, 3717 tests passed.