diff --git a/bridgev2/networkinterface.go b/bridgev2/networkinterface.go index bf2d60ee..d1d4215d 100644 --- a/bridgev2/networkinterface.go +++ b/bridgev2/networkinterface.go @@ -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. diff --git a/bridgev2/provisionutil/creategroup.go b/bridgev2/provisionutil/creategroup.go index acae9360..602ea9f8 100644 --- a/bridgev2/provisionutil/creategroup.go +++ b/bridgev2/provisionutil/creategroup.go @@ -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 }