diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index aff026e..f55a701 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -58,6 +58,7 @@ var discordCaps = &event.RoomFeatures{ ID: capID(), Reply: event.CapLevelFullySupported, Reaction: event.CapLevelFullySupported, + Delete: event.CapLevelFullySupported, Formatting: event.FormattingFeatureMap{ event.FmtBold: event.CapLevelFullySupported, event.FmtItalic: event.CapLevelFullySupported, diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index c33017a..e757dba 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -104,9 +104,10 @@ func (d *DiscordClient) HandleMatrixReactionRemove(ctx context.Context, removal return err } -func (d *DiscordClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridgev2.MatrixMessageRemove) error { - //TODO implement me - panic("implement me") +func (d *DiscordClient) HandleMatrixMessageRemove(ctx context.Context, removal *bridgev2.MatrixMessageRemove) error { + channelID := string(removal.Portal.ID) + messageID := string(removal.TargetMessage.ID) + return d.Session.ChannelMessageDelete(channelID, messageID) } func (d *DiscordClient) HandleMatrixReadReceipt(ctx context.Context, msg *bridgev2.MatrixReadReceipt) error {