ChronosXYZ/Influence

Incorrect parsing of image link in messages

Closed this issue · 1 comments

In the constructor of GenericMessage class there is a check for an image link (lines 41-43). It's done incorrectly, only the presence of the substrings "http" and ".jpg" is checked.
The correct check should be on the MIME type of response from the server on the detected link. Do not forget about other types of images like gif or png.
It would also be nice to display images links which are inserted in the middle of the text. At first, we check the message with a regular expression for the presence of links and then check the response from the server for the MIME type.
In the future, you can implement the ability to display multiple images by links in a single message.

Closed, because project is not maintaining anymore.