Skip to content
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

Removing an account does not remove it from autoconnect #1976

Closed
konomikitten opened this issue Jun 13, 2024 · 0 comments · Fixed by #1982
Closed

Removing an account does not remove it from autoconnect #1976

konomikitten opened this issue Jun 13, 2024 · 0 comments · Fixed by #1982
Assignees
Labels
Milestone

Comments

@konomikitten
Copy link

If you remove an account with /account remove test and this account is also the account set with /autoconnect set test. Then when you save the configuration and restart profanity it will try to connect to the non existent account.

Expected Behavior

Removing an account should also remove said account from autoconnect.

Current Behavior

Removed accounts are left in the autoconnect setting.

Possible Solution

When removing an account also check if it's set as the autoconnect account and remove it from that setting as well.

Steps to Reproduce (for bugs)

  1. /account add test
  2. /autoconnect set test
  3. /account remove test
  4. /save
  5. /quit
  6. Start profanity

Environment

$ profanity -v
Profanity, version 0.14.0
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2023 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.18.0)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.11.9)
GTK icons/clipboard: Enabled
GDK Pixbuf: Enabled
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ dpkg-query --show --showformat='${binary:Package} ${Version}\n' profanity libstrophe0 libglib2.0-0t64
libglib2.0-0t64:amd64 2.80.3-1
libglib2.0-0t64:i386 2.80.3-1
libstrophe0:amd64 0.13.1-1
profanity 0.14.0-1+b2
@jubalh jubalh self-assigned this Jun 13, 2024
@jubalh jubalh added the bug label Jun 13, 2024
@jubalh jubalh added this to the next milestone Jun 13, 2024
jubalh added a commit that referenced this issue Jun 20, 2024
When a user added an account, set it as autoconnect and then removed
that account. It still was set as the autoconnect account.

```
    /account add test
    /autoconnect set test
    /account remove test
    /save
    /quit
    Start profanity
```

Fix #1976
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 a pull request may close this issue.

2 participants