From 1ffe5eaa2662db93642b21b0ba443f1e575f44a4 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 14 Nov 2023 16:15:32 -0500 Subject: [PATCH] Always bridge own inbound group messages (#10) Use the user's Signal puppet to bridge them if no custom puppet is set --- user.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/user.go b/user.go index 4e7d20ab..4d53094b 100644 --- a/user.go +++ b/user.go @@ -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)