瀏覽代碼

Simplify expression

Tulir Asokan 3 年之前
父節點
當前提交
87c4cd6c20
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      portal.go

+ 1 - 1
portal.go

@@ -3075,7 +3075,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event) {
 		return
 	}
 
-	messageAge := time.Now().Sub(time.UnixMilli(evt.Timestamp))
+	messageAge := time.Since(time.UnixMilli(evt.Timestamp))
 	ms := metricSender{portal: portal}
 
 	origEvtID := evt.ID