scli icon indicating copy to clipboard operation
scli copied to clipboard

Allow creating new groups from scli

Open exquo opened this issue 5 years ago • 2 comments

Signal-cli has the updateGroup command that allows creating a new group or updating an existing one. It is also possible to do this with signal-cli in daemon mode through dbus, with a updateGroup method call. So implementing this in scli should be a matter of adding the appropriate UI.

exquo avatar Jul 03 '20 17:07 exquo

Like in #74, a :createGroup command may do the job. First argument should be the name of the group and the rest should be the members. But the problem is, writing all numbers might be hard for user. This can be solved with tab completion but I'm not quite sure how should it work. Here is what I have in my mind so far:

  • :createGroup group name here query<Tab> lists all the contacts containing the query in the statusbar, like {+123456789 (Contact Name) | +12349876 (Other Contact Name)}. When there is only one completion left, scli inserts (+123456789) Full Contact Name. A full command may look like: :createGroup my new group (+12345789) Contact 1, (+1345790123) Contact 2, (+1345790123) Another Contact. This should also be acceptable: :createGroup my new group +12345789 +1345790123 +1345790123

There is a problem with this solution though: there is no way to filter down the completions with space, it will only take last word into account and list completions based on that.

isamert avatar Jul 11 '20 22:07 isamert

Yes, looks like picking UI for this is less straightforward than the one for renameContact. Some more options:

  • Do it on the command line with the :createGroup command, but make the tab completion match any part of the contact's name, e.g. typing Becca or ker should both match Rebecca Baker.
  • Select / highlight / tag the contacts by navigating through a list of them (e.g. through ListWalker) and marking the desired ones (e.g. by pressing Space). This could be done in a separate window, or in the contacts window. If there is some kind of "multiple selection" mode for the contacts list, this can also be reused in the future for, e.g. sending the same message to several recipients at once, archiving / muting multiple conversations, etc.

exquo avatar Jul 13 '20 11:07 exquo