AsamK / signal-cli

signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
GNU General Public License v3.0
3.22k stars 306 forks source link

Allow username for account rather than telephone number #1599

Closed scottslewis closed 1 month ago

scottslewis commented 1 month ago

afaict, the only way to currently use signal-cli is to use the telephone number as the account id.

As per this signal enhancement: https://signal.org/blog/phone-number-privacy-usernames/

I would like to be able to send signal-cli command to an existing account identified by username rather than phone.

I expect this would necessitate allowing linking a new device to represent signal-cli as a new device and so having signal cli produce a url + QR code that can be linked via an existing account on signal phone app.

I might be able to contribute code providing this functionality as I'm getting familiar with libsignal and signal-cli codebases and have been a OSS project lead for some time.

AsamK commented 1 month ago

Usernames are already supported by signal-cli. signal-cli updateAccount --username NAME can be used to set a username for an existing account (https://github.com/AsamK/signal-cli/blob/master/man/signal-cli.1.adoc#updateaccount). The command returns a username link, that can be used to generate a QR code.

signal-cli send --username NAME can be used to send a message to a username or username link.

scottslewis commented 1 month ago

Thanks!