From 9bc06cb1502bd18ab4bb81703fb5d841ad99e3bb Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Tue, 23 Jun 2020 10:03:14 +0400 Subject: [PATCH] =?UTF-8?q?correction=20commit=20pr=C3=A9c=C3=A9dent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arlo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arlo.go b/arlo.go index a079352..5b39abc 100644 --- a/arlo.go +++ b/arlo.go @@ -234,10 +234,16 @@ func (a *Arlo) IsConnected() bool { } func (a *Arlo) Subscribe(ctx context.Context) error { + lastid := "" + if a.eventStream != nil { + lastid = a.eventStream.GetLastId() + } + a.eventStream = newEventStream( BaseUrl+fmt.Sprintf(NotifyResponsesPushServiceUri), &http.Client{Jar: a.client.GetClient().Jar}, a.client.Header.Get("Authorization"), + lastid, ) err := a.eventStream.listen(ctx)