--- a/notifications.go Fri Apr 28 11:47:18 2017 +0200
+++ b/notifications.go Fri Apr 28 13:28:16 2017 +0200
@@ -40,6 +40,17 @@
return ¬ification, nil
}
+// DismissNotification deletes a notification
+func (mc *Client) DismissNotification(notificationID int) error {
+ if notificationID < 1 {
+ return ErrInvalidID
+ }
+
+ endPoint := "notifications/dismiss"
+ params := apiCallParams{"id": strconv.Itoa(notificationID)}
+ return mc.apiCall(endPoint, rest.Post, params, &Notification{})
+}
+
// ClearNotifications deletes all notifications from the Mastodon server for
// the authenticated user
func (mc *Client) ClearNotifications() error {