notifications.go
changeset 99 6ec2a44a1bd1
parent 98 5d803adfc57e
child 102 187aa2a668a5
equal deleted inserted replaced
98:5d803adfc57e 99:6ec2a44a1bd1
    49 			return &notification, fmt.Errorf("%s", errorRes.Text)
    49 			return &notification, fmt.Errorf("%s", errorRes.Text)
    50 		}
    50 		}
    51 		return &notification, fmt.Errorf("notification API: %s", err.Error())
    51 		return &notification, fmt.Errorf("notification API: %s", err.Error())
    52 	}
    52 	}
    53 
    53 
       
    54 	if notification.ID == 0 {
       
    55 		return nil, ErrEntityNotFound
       
    56 	}
       
    57 
    54 	return &notification, nil
    58 	return &notification, nil
    55 }
    59 }
    56 
    60 
    57 // ClearNotifications deletes all notifications from the Mastodon server for
    61 // ClearNotifications deletes all notifications from the Mastodon server for
    58 // the authenticated user
    62 // the authenticated user