From 3de07ad550776a57e96399660c0ccd9c58dafcf3 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 24 Apr 2018 23:52:31 +0300 Subject: Add tests for syncer and fix some bugs --- matrix/matrix.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'matrix/matrix.go') diff --git a/matrix/matrix.go b/matrix/matrix.go index 2e97ef4..ee5d9bd 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -295,9 +295,7 @@ func (c *Container) processOwnMembershipChange(evt *gomatrix.Event) { func (c *Container) HandleMembership(evt *gomatrix.Event) { if evt.StateKey != nil && *evt.StateKey == c.config.Session.UserID { c.processOwnMembershipChange(evt) - } - - if !c.config.Session.InitialSyncDone /*&& evt.Timestamp < time.Now().Add(-1*time.Hour).Unix()*/ { + } else if !c.config.Session.InitialSyncDone /*&& evt.Timestamp < time.Now().Add(-1*time.Hour).Unix()*/ { // We don't care about other users' membership events in the initial sync. return } -- cgit v1.2.3