Skip to content

Commit 09153f6

Browse files
committed
startchat: update failed participants format
1 parent 98b7e08 commit 09153f6

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
golang.org/x/sync v0.17.0
1616
google.golang.org/protobuf v1.36.10
1717
gopkg.in/yaml.v3 v3.0.1
18-
maunium.net/go/mautrix v0.25.3-0.20251021144018-1aacf6e987b1
18+
maunium.net/go/mautrix v0.25.3-0.20251021155549-ef31dae082e5
1919
)
2020

2121
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
113113
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
114114
maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
115115
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
116-
maunium.net/go/mautrix v0.25.3-0.20251021144018-1aacf6e987b1 h1:jE/W7DZnnD3wWVinyiUkuN8lMBM8AcUiJX5V2fClj3Y=
117-
maunium.net/go/mautrix v0.25.3-0.20251021144018-1aacf6e987b1/go.mod h1:EWgYyp2iFZP7pnSm+rufHlO8YVnA2KnoNBDpwekiAwI=
116+
maunium.net/go/mautrix v0.25.3-0.20251021155549-ef31dae082e5 h1:DgOFsVa2evs4ZK6VFpwOrU50oh7PwCWBi7vXPEpW4Dk=
117+
maunium.net/go/mautrix v0.25.3-0.20251021155549-ef31dae082e5/go.mod h1:EWgYyp2iFZP7pnSm+rufHlO8YVnA2KnoNBDpwekiAwI=

pkg/connector/startchat.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (wa *WhatsAppClient) CreateGroup(ctx context.Context, params *bridgev2.Grou
250250
if err != nil {
251251
return nil, fmt.Errorf("failed to create group: %w", err)
252252
}
253-
failedParticipants := make(map[networkid.UserID]bridgev2.CreateChatFailedParticipant)
253+
failedParticipants := make(map[networkid.UserID]*bridgev2.CreateChatFailedParticipant)
254254
filteredParticipants := resp.Participants[:0]
255255
for _, pcp := range resp.Participants {
256256
if pcp.Error != 0 {
@@ -273,9 +273,10 @@ func (wa *WhatsAppClient) CreateGroup(ctx context.Context, params *bridgev2.Grou
273273
},
274274
}
275275
}
276-
failedParticipants[waid.MakeUserID(pcp.JID)] = bridgev2.CreateChatFailedParticipant{
277-
Reason: fmt.Sprintf("error %d", pcp.Error),
278-
InviteContent: inviteContent,
276+
failedParticipants[waid.MakeUserID(pcp.JID)] = &bridgev2.CreateChatFailedParticipant{
277+
Reason: fmt.Sprintf("error %d", pcp.Error),
278+
InviteEventType: event.EventMessage.Type,
279+
InviteContent: inviteContent,
279280
}
280281
} else {
281282
filteredParticipants = append(filteredParticipants, pcp)

0 commit comments

Comments
 (0)