Skip to content

Commit

Permalink
Always bridge own inbound group messages (#10)
Browse files Browse the repository at this point in the history
Use the user's Signal puppet to bridge them if no custom puppet is set
  • Loading branch information
AndrewFerr authored Nov 14, 2023
1 parent edf04da commit 1ffe5ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,12 @@ func (user *User) incomingMessageHandler(incomingMessage signalmeow.IncomingSign
chatID = m.RecipientUUID
senderPuppet = user.bridge.GetPuppetByCustomMXID(user.MXID)
if senderPuppet == nil {
err := fmt.Errorf("no puppet found for me (%s)", user.MXID)
user.log.Err(err).Msg("error getting puppet")
//return err
senderPuppet = user.bridge.GetPuppetBySignalID(m.SenderUUID)
if senderPuppet == nil {
err := fmt.Errorf("no puppet found for me (%s)", user.MXID)
user.log.Err(err).Msg("error getting puppet")
//return err
}
}
} else {
user.log.Debug().Msgf("Message received from %s (group: %v)", m.SenderUUID, m.GroupID)
Expand Down

0 comments on commit 1ffe5ea

Please sign in to comment.