messages/slack.py
def _add_attachments(self):
        """Add attachments."""
        if self.attachments:
            if not isinstance(self.attachments, list):
                self.attachments = [self.attachments]

            self.message["attachments"] = [
                {"image_url": url, "author_name": ""} for url in self.attachments
            ]
            if self.params:
                for attachment in self.message["attachments"]:
                    attachment.update(self.params)
def _add_attachments(self):
        if self.attachments:
            if not isinstance(self.attachments, list):
                self.attachments = [self.attachments]

            self.message["attachments"] = [
                {"image_url": url, "author_name": ""} for url in self.attachments
            ]
            if self.params:
                for attachment in self.message["attachments"]:
                    attachment.update(self.params)
def _add_attachments ( self ) : if self . attachments : if not isinstance ( self . attachments , list ) : self . attachments = [ self . attachments ] self . message [ "attachments" ] = [ { "image_url" : url , "author_name" : "" } for url in self . attachments ] if self . params : for attachment in self . message [ "attachments" ] : attachment . update ( self . params )
Add attachments.
Add attachments .