Skip to content

feat: allow setting displayname + selfavatar via CLI #6792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion deltachat-rpc-client/src/deltachat_rpc_client/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ def _run_cli(
)
parser.add_argument("--email", action="store", help="email address", default=os.getenv("DELTACHAT_EMAIL"))
parser.add_argument("--password", action="store", help="password", default=os.getenv("DELTACHAT_PASSWORD"))
parser.add_argument(
"--displayname", action="store", help="the profile's display name", default=os.getenv("DELTACHAT_DISPLAYNAME"),
)
parser.add_argument(
"--avatar", action="store", help="filename of the profile's avatar", default=os.getenv("DELTACHAT_AVATAR"),
)
args = parser.parse_args(argv[1:])

with Rpc(accounts_dir=args.accounts_dir, **kwargs) as rpc:
Expand All @@ -108,7 +114,12 @@ def _run_cli(
configure_thread = Thread(
target=client.configure,
daemon=True,
kwargs={"email": args.email, "password": args.password},
kwargs={
"email": args.email,
"password": args.password,
"displayname": args.displayname,
"selfavatar": args.avatar,
},
)
configure_thread.start()
client.run_forever()
Expand Down
Loading