Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend newline support #105

Open
TDGalea opened this issue May 3, 2019 · 6 comments
Open

Extend newline support #105

TDGalea opened this issue May 3, 2019 · 6 comments

Comments

@TDGalea
Copy link

TDGalea commented May 3, 2019

Updated issue

We support \n in message bodies, but we want to extend this to support \\n as well. It's simply a case of replacing \\n with the linebreak char facebook wants.

Original issue

First of all, if this is considered a feature request rather than a bug/issue, I apologise.

I'm attempting to send a message with newlines inside it, by using a variable as the message. Instead, messer only sends the first line.

Below, we set the message variable, and echo it back to ensure it's correct:

$ msg="$(echo -e Testing\\nmultiple\\nlines)"
$ echo "$msg"
Testing
multiple
lines

The echo confirms that we've added new lines correctly. So, we should be able to send that via messer:

$ messer --command='m "{name}" '"$msg"

Naturally, I'd expect the received message to read:

Testing
multiple
lines

but instead, I receive just the first line:

Testing

I'd rather be able to break up the message into lines rather than have it all bulked together, or have the hassle of lines being received separately, usually in the wrong order.

Version information:
npm: 3.5.2
node: v8.10.0
messer: 0.5.1
OS: Ubuntu Server 18.04
@tomquirk tomquirk added the bug label May 5, 2019
@tomquirk
Copy link
Collaborator

tomquirk commented May 6, 2019

Hey 👋 Messer 0.5.2 has just been published, and this issue was fixed! Install it and give it a whirl 🤘. If you’re still experiencing this issue, please comment below with your symptoms and we'll keep the ticket open. Thanks for supporting Messer 💬

@tomquirk tomquirk closed this as completed May 6, 2019
@TDGalea
Copy link
Author

TDGalea commented May 6, 2019

Unfortunately still the same in version 0.5.2. Still only sends the first line.

@tomquirk
Copy link
Collaborator

tomquirk commented May 6, 2019

this works for me

messer --command='m "Tom Quirk" hey\ntom'

@tomquirk tomquirk reopened this May 6, 2019
@TDGalea
Copy link
Author

TDGalea commented May 6, 2019

Okay, newlines of that style work.
Shame that it can't send newlines preserved from a variable (or command's output) as I had originally intended, but this will work for the main purpose I have.

Thanks.

@tomquirk
Copy link
Collaborator

tomquirk commented May 6, 2019

ah sorry, didn't properly read your usecase. I'm happy to add that, but will come out in a future release

@tomquirk tomquirk changed the title Cannot send multiple lines Extend newline support May 6, 2019
@TDGalea
Copy link
Author

TDGalea commented May 6, 2019

That's fine. I appreciate the work.

@tomquirk tomquirk modified the milestones: v0.6.0, v1.0.0 May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants