diff options
Diffstat (limited to 'matrix/sync.go')
-rw-r--r-- | matrix/sync.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/matrix/sync.go b/matrix/sync.go index 0169e8e..35a694a 100644 --- a/matrix/sync.go +++ b/matrix/sync.go @@ -33,15 +33,17 @@ import ( // replace parts of this default syncer (e.g. the ProcessResponse method). The default syncer uses the observer // pattern to notify callers about incoming events. See GomuksSyncer.OnEventType for more information. type GomuksSyncer struct { - Session *config.Session - listeners map[string][]gomatrix.OnEventListener // event type to listeners array + Session *config.Session + listeners map[string][]gomatrix.OnEventListener // event type to listeners array + FirstSyncDone bool } // NewGomuksSyncer returns an instantiated GomuksSyncer func NewGomuksSyncer(session *config.Session) *GomuksSyncer { return &GomuksSyncer{ - Session: session, - listeners: make(map[string][]gomatrix.OnEventListener), + Session: session, + listeners: make(map[string][]gomatrix.OnEventListener), + FirstSyncDone: false, } } @@ -87,6 +89,8 @@ func (s *GomuksSyncer) ProcessResponse(res *gomatrix.RespSync, since string) (er } } + s.FirstSyncDone = true + return } |