Improve typing notification handling

This commit is contained in:
Tulir Asokan
2023-02-04 14:16:58 +02:00
parent 80f8bed9b9
commit 1e81fc6a02
2 changed files with 19 additions and 5 deletions

View File

@@ -995,11 +995,7 @@ func (user *User) typingStartHandler(_ *discordgo.Session, t *discordgo.TypingSt
if portal == nil || portal.MXID == "" {
return
}
puppet := user.bridge.GetPuppetByID(t.UserID)
_, err := puppet.IntentFor(portal).UserTyping(portal.MXID, true, 12*time.Second)
if err != nil {
user.log.Warnfln("Failed to mark %s as typing in %s: %v", puppet.MXID, portal.MXID, err)
}
portal.handleDiscordTyping(t)
}
func (user *User) interactionSuccessHandler(_ *discordgo.Session, s *discordgo.InteractionSuccess) {