From 2d07f920c2b9c7b677e23fd0a7e2847c47b60764 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Thu, 11 Jan 2024 08:48:37 -0700 Subject: [PATCH] fixup! client: add key backup functions Signed-off-by: Sumner Evans --- client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client.go b/client.go index 87d3de50..5dc1c0be 100644 --- a/client.go +++ b/client.go @@ -2050,10 +2050,10 @@ func (cli *Client) GetKeyBackupLatestVersion(ctx context.Context) (resp *RespRoo return } -// CreateBackupVersion creates a new key backup. +// CreateKeyBackupVersion creates a new key backup. // // See: https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3room_keysversion -func (cli *Client) CreateBackupVersion(ctx context.Context, req *ReqRoomKeysVersionCreate) (resp *RespRoomKeysVersionCreate, err error) { +func (cli *Client) CreateKeyBackupVersion(ctx context.Context, req *ReqRoomKeysVersionCreate) (resp *RespRoomKeysVersionCreate, err error) { urlPath := cli.BuildClientURL("v3", "room_keys", "version") _, err = cli.MakeRequest(ctx, http.MethodPost, urlPath, req, &resp) return @@ -2068,22 +2068,22 @@ func (cli *Client) GetKeyBackupVersion(ctx context.Context, version string) (res return } -// UpdateRoomKeysVersion updates information about an existing key backup. Only +// UpdateKeyBackupVersion updates information about an existing key backup. Only // the auth_data can be modified. // // See: https://spec.matrix.org/v1.9/client-server-api/#put_matrixclientv3room_keysversionversion -func (cli *Client) UpdateRoomKeysVersion(ctx context.Context, version string, req *ReqRoomKeysVersionUpdate) error { +func (cli *Client) UpdateKeyBackupVersion(ctx context.Context, version string, req *ReqRoomKeysVersionUpdate) error { urlPath := cli.BuildClientURL("v3", "room_keys", "version", version) _, err := cli.MakeRequest(ctx, http.MethodPut, urlPath, nil, nil) return err } -// DeleteRoomKeysVersion deletes an existing key backup. Both the information +// DeleteKeyBackupVersion deletes an existing key backup. Both the information // about the backup, as well as all key data related to the backup will be // deleted. // // See: https://spec.matrix.org/v1.1/client-server-api/#delete_matrixclientv3room_keysversionversion -func (cli *Client) DeleteRoomKeysVersion(ctx context.Context, version string) error { +func (cli *Client) DeleteKeyBackupVersion(ctx context.Context, version string) error { urlPath := cli.BuildClientURL("v3", "room_keys", "version", version) _, err := cli.MakeRequest(ctx, http.MethodDelete, urlPath, nil, nil) return err