aboutsummaryrefslogtreecommitdiff
path: root/eduserver/input
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-03-30 16:40:28 +0100
committerGitHub <noreply@github.com>2020-03-30 16:40:28 +0100
commit8fbe9f40782bd56561c75ac74916900c11db3654 (patch)
treec5600864699e5935dfb0df1b884920e7f296906e /eduserver/input
parent11a8059bba9dbdc855f10e3b380c4a2f245635a2 (diff)
Implement typing over federation (#949)
Also fix a pet peeve of mine: not putting units on things!!! Manually tested on p2p and works well, with some fudge factor delay.
Diffstat (limited to 'eduserver/input')
-rw-r--r--eduserver/input/input.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eduserver/input/input.go b/eduserver/input/input.go
index e0cc6922..84590945 100644
--- a/eduserver/input/input.go
+++ b/eduserver/input/input.go
@@ -46,7 +46,7 @@ func (t *EDUServerInputAPI) InputTypingEvent(
if ite.Typing {
// user is typing, update our current state of users typing.
expireTime := ite.OriginServerTS.Time().Add(
- time.Duration(ite.Timeout) * time.Millisecond,
+ time.Duration(ite.TimeoutMS) * time.Millisecond,
)
t.Cache.AddTypingUser(ite.UserID, ite.RoomID, &expireTime)
} else {
@@ -69,7 +69,7 @@ func (t *EDUServerInputAPI) sendEvent(ite *api.InputTypingEvent) error {
if ev.Typing {
expireTime := ite.OriginServerTS.Time().Add(
- time.Duration(ite.Timeout) * time.Millisecond,
+ time.Duration(ite.TimeoutMS) * time.Millisecond,
)
ote.ExpireTime = &expireTime
}