-
Notifications
You must be signed in to change notification settings - Fork 3
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
Translate photos from Telegram as links #99
Conversation
Emulsion/Telegram/Funogram.fs
Outdated
let private getMessageBodyText (message: FunogramMessage) = | ||
let text = | ||
match message with | ||
| { Text = Some text } -> applyEntities message.Entities text | ||
| { Caption = Some caption } -> | ||
let caption = applyEntities message.CaptionEntities caption | ||
sprintf "[Content with caption \"%s\"]" caption | ||
sprintf "%s\n%s" caption (getLinkToMessage message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new format is easy to mistake for a genuine message. Also, I'd keep the URL on the same line, because vertical space is scarce on wide monitors, and links are only useful if the caption is interesting. So I suggest a mix of the old and new formats: [Content with caption \"%s\", %s]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a reason why we don't usually put any links near typographic like ,
or ]
: some XMPP clients like to include these characters into the link body, and break the link in the process.
Yet, this format would be really easy to mistake for a geniune message. I suggest the following:
[Content with caption "%s"]: %s
This probably has a bit awkward typographics, but solves all the mentioned problems.
Пусть Эндер сам свои войсы слушает. :P On a serious note, what types are available? Voice and video messages? |
@Minoru Video, audio, GIFs, and files. |
I don't see any reason to support one type and not support the other, so: support all of them, in the same way? Or is there some type-specific gotchas that make this impossible? |
Voice messages are banned for Mr. Ender, you shouldn't worry about that. I agree that we should import all the available content. I'm not aware of alternative content sources, so probably users should use VPN if they're under Russian restrictions. This is rather unfortunate, but our life is too. |
bcfb481
to
8b935df
Compare
8b935df
to
8f2a64e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your help on that. I've filed #102 with further content experience improvements, but let's test this system for now.
A side note: Travis is being shitty again, as usual. |
Closes #26
Unresolved questions:
@ForNeVeR @Minoru What do you think? Thanks!