mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Fix necessary field not set properly in TypingEvent; clean up OutputTypingEvent
Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
parent
2a9dab21f8
commit
e7cf44946f
|
|
@ -23,8 +23,6 @@ type OutputTypingEvent struct {
|
|||
// ExpireTime is the interval after which the user should no longer be
|
||||
// considered typing. Only available if Event.Typing is true.
|
||||
ExpireTime *time.Time
|
||||
// Users typing in the room when the event was generated.
|
||||
TypingUsers []string `json:"typing_users"`
|
||||
}
|
||||
|
||||
// TypingEvent represents a matrix edu event of type 'm.typing'.
|
||||
|
|
|
|||
|
|
@ -57,15 +57,14 @@ func (t *TypingServerInputAPI) InputTypingEvent(
|
|||
}
|
||||
|
||||
func (t *TypingServerInputAPI) sendEvent(ite *api.InputTypingEvent) error {
|
||||
userIDs := t.Cache.GetTypingUsers(ite.RoomID)
|
||||
ev := &api.TypingEvent{
|
||||
Type: gomatrixserverlib.MTyping,
|
||||
RoomID: ite.RoomID,
|
||||
UserID: ite.UserID,
|
||||
Typing: ite.Typing,
|
||||
}
|
||||
ote := &api.OutputTypingEvent{
|
||||
Event: *ev,
|
||||
TypingUsers: userIDs,
|
||||
Event: *ev,
|
||||
}
|
||||
|
||||
if ev.Typing {
|
||||
|
|
|
|||
Loading…
Reference in a new issue