Sync puppets when they send a message

Fixes #30, Fixes #34
This commit is contained in:
Gary Kramlich
2022-04-27 13:48:36 -05:00
parent 8ce5af2fb5
commit fc51c6e94e
2 changed files with 6 additions and 1 deletions

View File

@@ -418,7 +418,9 @@ func (p *Portal) handleDiscordMessageCreate(user *User, msg *discordgo.Message)
return
}
intent := p.bridge.GetPuppetByID(msg.Author.ID).IntentFor(p)
puppet := p.bridge.GetPuppetByID(msg.Author.ID)
puppet.SyncContact(user)
intent := puppet.IntentFor(p)
if msg.Content != "" {
content := &event.MessageEventContent{