Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions bridgev2/networkinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,14 @@ type PushParsingNetwork interface {
ParsePushNotification(ctx context.Context, data json.RawMessage) (networkid.UserLoginID, any, error)
}

// DeleteChatHandlingNetworkAPI is an optional interface that network connectors
// can implement to delete a chat from the remote network.
type DeleteChatHandlingNetworkAPI interface {
NetworkAPI
// HandleMatrixDeleteChat is called when the user explicitly deletes a chat.
HandleMatrixDeleteChat(ctx context.Context, msg *MatrixDeleteChat) error
}

type RemoteEventType int

func (ret RemoteEventType) String() string {
Expand Down Expand Up @@ -1374,6 +1382,13 @@ type MatrixViewingChat struct {
Portal *Portal
}

type MatrixDeleteChat struct {
// The portal that the user deleted.
Portal *Portal
// Delete the chat for the other user in that chat. Not every bridge supports this.
DeleteForEveryone bool
}

type MatrixMarkedUnread = MatrixRoomMeta[*event.MarkedUnreadEventContent]
type MatrixMute = MatrixRoomMeta[*event.BeeperMuteEventContent]
type MatrixRoomTag = MatrixRoomMeta[*event.TagEventContent]