--- a/cmd/notifications.go Sun Apr 23 22:40:52 2017 +0200
+++ b/cmd/notifications.go Sun Apr 23 23:32:16 2017 +0200
@@ -9,6 +9,8 @@
"errors"
"github.com/spf13/cobra"
+
+ "github.com/McKael/madon"
)
var notificationsOpts struct {
@@ -51,7 +53,12 @@
var err error
if opt.list {
- obj, err = gClient.GetNotifications()
+ var notifications []madon.Notification
+ notifications, err = gClient.GetNotifications()
+ if accountsOpts.limit > 0 {
+ notifications = notifications[:accountsOpts.limit]
+ }
+ obj = notifications
} else if opt.notifID > 0 {
obj, err = gClient.GetNotification(opt.notifID)
}