mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
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.
This commit is contained in:
parent
11a8059bba
commit
8fbe9f4078
10 changed files with 75 additions and 25 deletions
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/matrix-org/gomatrixserverlib"
|
||||
)
|
||||
|
||||
// EDUServerProducer produces events for the typing server to consume
|
||||
// EDUServerProducer produces events for the EDU server to consume
|
||||
type EDUServerProducer struct {
|
||||
InputAPI api.EDUServerInputAPI
|
||||
}
|
||||
|
@ -35,13 +35,13 @@ func NewEDUServerProducer(inputAPI api.EDUServerInputAPI) *EDUServerProducer {
|
|||
// SendTyping sends a typing event to EDU server
|
||||
func (p *EDUServerProducer) SendTyping(
|
||||
ctx context.Context, userID, roomID string,
|
||||
typing bool, timeout int64,
|
||||
typing bool, timeoutMS int64,
|
||||
) error {
|
||||
requestData := api.InputTypingEvent{
|
||||
UserID: userID,
|
||||
RoomID: roomID,
|
||||
Typing: typing,
|
||||
Timeout: timeout,
|
||||
TimeoutMS: timeoutMS,
|
||||
OriginServerTS: gomatrixserverlib.AsTimestamp(time.Now()),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue