mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/networkinterface: add interface to handle deleting chat from matrix
This commit is contained in:
parent
30ab68f7f1
commit
77e6174ff8
1 changed files with 15 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue