From 5141fefe64cd564b8d554704fc9200dd26c5cbf9 Mon Sep 17 00:00:00 2001 From: Anant Prakash Date: Thu, 26 Jul 2018 22:24:02 +0530 Subject: [PATCH] simplify code --- src/github.com/matrix-org/dendrite/typingserver/cache/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/typingserver/cache/cache.go b/src/github.com/matrix-org/dendrite/typingserver/cache/cache.go index 4ad352e39..3d8978751 100644 --- a/src/github.com/matrix-org/dendrite/typingserver/cache/cache.go +++ b/src/github.com/matrix-org/dendrite/typingserver/cache/cache.go @@ -53,7 +53,7 @@ func (t *TypingCache) GetTypingUsers(roomID string) (users []string) { // if expire is nil, defaultTypingTimeout is assumed. func (t *TypingCache) AddTypingUser(userID, roomID string, expire *time.Time) { expireTime := getExpireTime(expire) - if until := time.Until(expireTime); until > 0 { + if time.Until(expireTime) > 0 { t.addUser(userID, roomID, expireTime) t.removeUserAfterTime(userID, roomID, expireTime) }