Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

how to send formatted messages to Telegram? #64

Closed
lagleki opened this issue Apr 1, 2016 · 9 comments
Closed

how to send formatted messages to Telegram? #64

lagleki opened this issue Apr 1, 2016 · 9 comments

Comments

@lagleki
Copy link

lagleki commented Apr 1, 2016

Is rich text currently supported in any form? Which functions can enable it?
I mostly think of replacing ugly <username> imported from IRC with something prettier.

@lagleki
Copy link
Author

lagleki commented Apr 2, 2016

The answer is to use in tg.js tg.sendMessage(channel.tgChatId, msg, {parse_mode: "Markdown"}); or whatever format you want.

@lagleki lagleki changed the title hhow to send formatted messages to Telegram? how to send formatted messages to Telegram? Apr 2, 2016
@FruitieX
Copy link
Owner

FruitieX commented Apr 2, 2016

This would be neat as a parse as markdown config option, default can be on. Care to make a pull request? :)

@lagleki
Copy link
Author

lagleki commented Apr 4, 2016

It appears that malformed markdown (like unclosed _ tags) can lead to errors while trying to send a message to Telegram.

So I now recommend using escaping html entities and using HTML markdown instead.

@FruitieX
Copy link
Owner

FruitieX commented May 7, 2016

Maybe we shouldn't support this as it can also be very confusing (and cause errors possibly as you say)

@FruitieX
Copy link
Owner

FruitieX commented May 7, 2016

Alternatively there should be a command on the IRC side such as !md parsed-markdown-here which is required as a prefix for parsing the message as markdown

@FruitieX FruitieX added this to the 0.5.0 milestone May 7, 2016
@lagleki
Copy link
Author

lagleki commented May 7, 2016

2016-05-07 14:40 GMT+03:00 Rasmus Eskola notifications@github.com:

Maybe we shouldn't support this as it can also be very confusing (and
cause errors possibly as you say)

For markdown let's abandon it, yes.
For HTML it seems fine once you escape special symbols.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#64 (comment)

@FruitieX
Copy link
Owner

FruitieX commented May 7, 2016

Think I'll close this then. Might do a markdown command at some point, as referenced from #29.

@FruitieX FruitieX closed this as completed May 7, 2016
@lagleki
Copy link
Author

lagleki commented May 7, 2016

What about HTML?

2016-05-07 15:00 GMT+03:00 Rasmus Eskola notifications@github.com:

Closed #64 #64.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#64 (comment)

@FruitieX
Copy link
Owner

FruitieX commented May 7, 2016

We can have that as a separate command as well IMHO. I wouldn't necessarily want it to parse IRC messages as anything else than plain text by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants