-
Notifications
You must be signed in to change notification settings - Fork 90
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
hack to handle incoming files which come as an absolute path #255
base: master
Are you sure you want to change the base?
Conversation
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 |
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.
I dont know a better approach either :(
boost::filesystem::path(target_file) | ||
); | ||
|
||
plain |
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.
Please remove newline
xhtml_ = xhtml; | ||
g_free(xhtml); | ||
g_free(strip); | ||
} else { |
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.
Add a line break:
}
else {
g_free(xhtml); | ||
g_free(strip); | ||
} else { | ||
// Escape HTML characters. |
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.
This whole section is not properly indented?
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_im
gets 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.