Skip to content

Commit

Permalink
Mastodon Support (caronc#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc authored Nov 11, 2022
1 parent 32992fa commit 6d3ab9b
Show file tree
Hide file tree
Showing 7 changed files with 1,739 additions and 5 deletions.
1 change: 1 addition & 0 deletions KEYWORDS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ KODI
Kumulos
LaMetric
Line
Mastodon
MacOS
Mailgun
Matrix
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ The table below identifies the services this tool supports and some example serv
| [LaMetric Time](https://github.com/caronc/apprise/wiki/Notify_lametric) | lametric:// | (TCP) 443 | lametric://apikey@device_ipaddr<br/>lametric://apikey@hostname:port<br/>lametric://client_id@client_secret
| [Line](https://github.com/caronc/apprise/wiki/Notify_line) | line:// | (TCP) 443 | line://Token@User<br/>line://Token/User1/User2/UserN
| [Mailgun](https://github.com/caronc/apprise/wiki/Notify_mailgun) | mailgun:// | (TCP) 443 | mailgun://user@hostname/apikey<br />mailgun://user@hostname/apikey/email<br />mailgun://user@hostname/apikey/email1/email2/emailN<br />mailgun://user@hostname/apikey/?name="From%20User"
| [Mastodon](https://github.com/caronc/apprise/wiki/Notify_mastodon) | mastodon:// or mastodons://| (TCP) 80 or 443 | mastodon://access_key@hostname<br />mastodon://access_key@hostname/@user<br />mastodon://access_key@hostname/@user1/@user2/@userN
| [Matrix](https://github.com/caronc/apprise/wiki/Notify_matrix) | matrix:// or matrixs:// | (TCP) 80 or 443 | matrix://hostname<br />matrix://user@hostname<br />matrixs://user:pass@hostname:port/#room_alias<br />matrixs://user:pass@hostname:port/!room_id<br />matrixs://user:pass@hostname:port/#room_alias/!room_id/#room2<br />matrixs://token@hostname:port/?webhook=matrix<br />matrix://user:token@hostname/?webhook=slack&format=markdown
| [Mattermost](https://github.com/caronc/apprise/wiki/Notify_mattermost) | mmost:// or mmosts:// | (TCP) 8065 | mmost://hostname/authkey<br />mmost://hostname:80/authkey<br />mmost://user@hostname:80/authkey<br />mmost://hostname/authkey?channel=channel<br />mmosts://hostname/authkey<br />mmosts://user@hostname/authkey<br />
| [Microsoft Teams](https://github.com/caronc/apprise/wiki/Notify_msteams) | msteams:// | (TCP) 443 | msteams://TokenA/TokenB/TokenC/
Expand Down
11 changes: 10 additions & 1 deletion apprise/AppriseAttachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ def add(self, attachments, asset=None, cache=None):
return_status = False
continue

elif isinstance(_attachment, AppriseAttachment):
# We were provided a list of Apprise Attachments
# append our content together
instance = _attachment.attachments

elif not isinstance(_attachment, attachment.AttachBase):
logger.warning(
"An invalid attachment (type={}) was specified.".format(
Expand All @@ -196,7 +201,11 @@ def add(self, attachments, asset=None, cache=None):
continue

# Add our initialized plugin to our server listings
self.attachments.append(instance)
if isinstance(instance, list):
self.attachments.extend(instance)

else:
self.attachments.append(instance)

# Return our status
return return_status
Expand Down
Loading

0 comments on commit 6d3ab9b

Please sign in to comment.