isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
432 stars 40 forks source link

scli cannot parse new signal-cli users #182

Closed mikeevmm closed 2 years ago

mikeevmm commented 2 years ago

I tried doing a fresh installation of signal-cli/scli on my computer, but scli couldn't find my account, despite signal-cli -u (...) receive working fine. Rolling back to v0.7.0 of scli gets me

ERROR: Multiple accounts found. Run one of:
        scli --username=(...)
        scli --username=accounts.json

when running scli.

I think this has to do with how signal-cli now handles accounts; if I recall correctly, signal-cli used to create a folder named after the phone number under ~/.local/share/signal-cli/data for each user. Now, it seems to create a folder with a random(?) sequence, and provide information mapping username to folder name under ~/.local/share/signal-cli/data/accounts.json.

This could likely be approached by checking the existence of accounts.json and switching behaviours depending on that, but I'm not sure how migration can be handled.

mikeevmm commented 2 years ago

I think this is an easy fix, I'll try to submit a PR soon.

mikeevmm commented 2 years ago

There we go. Please review the above PR when convenient. Cheers.

exquo commented 2 years ago

Thanks for reporting this! The issue itself is the same as #180 that I have prematurely closed. I've left a comment in your PR.