Skip to content

Conversation

WofWca
Copy link
Collaborator

@WofWca WofWca commented Sep 17, 2025

Regarding the @deprecated addition:
it's not clear to me why the listAccounts function exists,
why getAllAccounts gets special treatment.
It has been there ever since the introduction of JSON-RPC.
Maybe it's because of the existence of getContextEvents,
which has to do with accounts.
But hopefully the new doc on getContextEvents
compensates for this.

Regarding the `@deprecated` addition:
it's not clear to me why the `listAccounts` function exists,
why `getAllAccounts` gets special treatment.
It has been there ever since the introduction of JSON-RPC.
Maybe it's because of the existence of `getContextEvents`,
which has to do with accounts.
But hopefully the new doc on `getContextEvents`
compensates for this.
@WofWca WofWca added the jsonrpc label Sep 17, 2025
Comment on lines +73 to +75
/**
* @deprecated use {@linkcode BaseDeltaChat.rpc.getAllAccounts} instead.
*/
Copy link
Contributor

@Simon-Laux Simon-Laux Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR: the original idea of these method is to be a convenience method, like python bindings which create some wrappers around the RPC functions. But I totally agree that it is not needed here and would only increase maintenance burden.

I also tried auto generating some convince classes but ultimately scraped the idea: #3697

would need much discipline in naming things and order of method arguments and still add extra complexity that is not worth the reward.

this method is basically a leftover of that idea.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification.

@link2xt link2xt merged commit 2534510 into main Oct 2, 2025
29 checks passed
@link2xt link2xt deleted the wofwca/BaseDeltaChat-docs branch October 2, 2025 16:48
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.

3 participants