mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/provisioning: allow group creation to signal failed participants
This commit is contained in:
parent
36edccf61a
commit
8ee8fb1a20
2 changed files with 11 additions and 0 deletions
|
|
@ -732,6 +732,13 @@ type CreateChatResponse struct {
|
|||
// If a start DM request (CreateChatWithGhost or ResolveIdentifier) returns the DM to a different user,
|
||||
// this field should have the user ID of said different user.
|
||||
DMRedirectedTo networkid.UserID
|
||||
|
||||
FailedParticipants map[networkid.UserID]CreateChatFailedParticipant
|
||||
}
|
||||
|
||||
type CreateChatFailedParticipant struct {
|
||||
Reason string `json:"reason"`
|
||||
InviteContent *event.Content `json:"invite_content,omitempty"`
|
||||
}
|
||||
|
||||
// IdentifierResolvingNetworkAPI is an optional interface that network connectors can implement to support starting new direct chats.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ type RespCreateGroup struct {
|
|||
ID networkid.PortalID `json:"id"`
|
||||
MXID id.RoomID `json:"mxid"`
|
||||
Portal *bridgev2.Portal `json:"-"`
|
||||
|
||||
FailedParticipants map[networkid.UserID]bridgev2.CreateChatFailedParticipant `json:"failed_participants,omitempty"`
|
||||
}
|
||||
|
||||
func CreateGroup(ctx context.Context, login *bridgev2.UserLogin, params *bridgev2.GroupCreateParams) (*RespCreateGroup, error) {
|
||||
|
|
@ -109,5 +111,7 @@ func CreateGroup(ctx context.Context, login *bridgev2.UserLogin, params *bridgev
|
|||
ID: resp.Portal.ID,
|
||||
MXID: resp.Portal.MXID,
|
||||
Portal: resp.Portal,
|
||||
|
||||
FailedParticipants: resp.FailedParticipants,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue