@@ -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{
|
||||
|
||||
@@ -164,7 +164,10 @@ func (p *Puppet) CustomIntent() *appservice.IntentAPI {
|
||||
|
||||
func (p *Puppet) updatePortalMeta(meta func(portal *Portal)) {
|
||||
for _, portal := range p.bridge.GetAllPortalsByID(p.ID) {
|
||||
// Get room create lock to prevent races between receiving contact info and room creation.
|
||||
portal.roomCreateLock.Lock()
|
||||
meta(portal)
|
||||
portal.roomCreateLock.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user