Skip to content

zulip: Add remove_storage helper to Client.#916

Open
hanyucrocks wants to merge 1 commit intozulip:mainfrom
hanyucrocks:add-remove-storage-helper
Open

zulip: Add remove_storage helper to Client.#916
hanyucrocks wants to merge 1 commit intozulip:mainfrom
hanyucrocks:add-remove-storage-helper

Conversation

@hanyucrocks
Copy link
Copy Markdown
Collaborator

Mirrors update_storage and get_storage, sending DELETE to /bot_storage. With no argument, removes all data stored for the bot; passing {"keys": [...]} removes only the specified entries.

The corresponding endpoint is bot-only as of Zulip 12.0 (API feature level 494), so this helper only succeeds for bot users.

Fixes #637.

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

Mirrors update_storage and get_storage, sending DELETE to
/bot_storage. With no argument, removes all data stored for the
bot; passing {"keys": [...]} removes only the specified entries.

The corresponding endpoint is bot-only as of Zulip 12.0 (API
feature level 494), so this helper only succeeds for bot users.

Fixes zulip#637.
@chrisbobbe
Copy link
Copy Markdown

It looks like you wrote documentation for this, in zulip/zulip#38786 . Thanks for that!

I think a code comment linking to https://zulip.com/api/remove-bot-storage would be helpful here, but (from a quick look) it looks like that's not been our practice in this code. Is @amanagr the right person to confirm that we want to start doing that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add remove_storage helper to the Python API.

3 participants