hack to handle incoming files which come as an absolute path#255
Open
dexterlb wants to merge 8 commits intoSpectrumIM:masterfrom
Open
hack to handle incoming files which come as an absolute path#255dexterlb wants to merge 8 commits intoSpectrumIM:masterfrom
dexterlb wants to merge 8 commits intoSpectrumIM:masterfrom
Conversation
Collaborator
|
Sorry for delay, finally found time to set up telegram, the root problem is there - https://github.com/majn/telegram-purple/blob/master/tgp-msg.c#L209 |
stv0g
suggested changes
May 1, 2019
Contributor
stv0g
left a comment
There was a problem hiding this comment.
I dont know a better approach either :(
| boost::filesystem::path(target_file) | ||
| ); | ||
|
|
||
| plain |
| xhtml_ = xhtml; | ||
| g_free(xhtml); | ||
| g_free(strip); | ||
| } else { |
| g_free(xhtml); | ||
| g_free(strip); | ||
| } else { | ||
| // Escape HTML characters. |
Contributor
There was a problem hiding this comment.
This whole section is not properly indented?
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.
Just to be clear: This pull request proposes a nasty workaround. If someone could point the root cause so that this can be properly fixed, it would be much better.
Current behaviour:
when receiving a file through the libpurple backend from a service which uses cloud storage (such as telegram, skypeweb etc),
conv_write_imgets passed a message which looks like this:And so, the message is sent to the user, resulting in them seeing a raw filesystem path on the server (ugh!)
Workaround:
This seems to be happening somewhere in libpurple. Since I'm (so far) unable to locate it, I'm proposing this workaround, which matches those messages, moves the respectful file to the web storage (if enabled), and modifies the message to include a proper link.