def onebox(self, message):
        if any(i.match(message.strip()) for i in self.url_regex):
            if any(message.lower().endswith(i) for i in (".jpg", ".jpeg",
                    ".png", ".gif")):
                return "[![%s](%s)](%s)" % (message, message, message)
            return "[%s](%s)" % (message, message)
        return message
dataset/ETHPy150Open sfstpala/Victory-Chat/modules/onebox.py/OneBoxMixIn.onebox/original