UX Improvements: CLI #106

Closed
opened 2018-08-05 00:43:19 +00:00 by kardan · 6 comments

I trusted a peer and accepted the group invitation, so I see:

cwtch [a]> peers
Name: ogyogoytizc7jrzv Status: 1
Name: hhtcueyjalbhrooe Status: 3
cwtch [a]> groups
Group Id: 0ec1e8de12d2e3a42fd20ef2e242b881 Owner: hhtcueyjalbhrooe Accepted:true
cwtch [a]> send 0ec1e8de12d2e3a42fd20ef2e242b881 bla
Error: channel isn't set up yet

According to peer/fetch/peer_fetch_channel.go:76 cpsc.channel.Pending is true. In the code I could not find how to toggle this:

~/go/src/cwtch.im/cwtch$ rgrep "Pending"
peer/peer/peer_channel.go:                      cpc.channel.Pending = false
peer/peer/peer_channel_test.go: if channel.Pending != false {
peer/listen/peer_listen_channel_test.go:        if channel.Pending {
peer/listen/peer_listen_channel.go:                     cplc.channel.Pending = false
peer/fetch/peer_fetch_channel.go:                       cpfc.channel.Pending = false
peer/fetch/peer_fetch_channel.go:       if cpfc.channel.Pending == false {
peer/fetch/peer_fetch_channel_test.go:  if channel.Pending {
peer/send/peer_send_channel_test.go:    if channel.Pending {
peer/send/peer_send_channel.go:                 cpsc.channel.Pending = false
peer/send/peer_send_channel.go: if cpsc.channel.Pending == false {

Edit: This may be related to #33.

I trusted a peer and accepted the group invitation, so I see: ``` cwtch [a]> peers Name: ogyogoytizc7jrzv Status: 1 Name: hhtcueyjalbhrooe Status: 3 cwtch [a]> groups Group Id: 0ec1e8de12d2e3a42fd20ef2e242b881 Owner: hhtcueyjalbhrooe Accepted:true cwtch [a]> send 0ec1e8de12d2e3a42fd20ef2e242b881 bla Error: channel isn't set up yet ``` According to `peer/fetch/peer_fetch_channel.go:76` *cpsc.channel.Pending* is true. In the code I could not find how to toggle this: ``` ~/go/src/cwtch.im/cwtch$ rgrep "Pending" peer/peer/peer_channel.go: cpc.channel.Pending = false peer/peer/peer_channel_test.go: if channel.Pending != false { peer/listen/peer_listen_channel_test.go: if channel.Pending { peer/listen/peer_listen_channel.go: cplc.channel.Pending = false peer/fetch/peer_fetch_channel.go: cpfc.channel.Pending = false peer/fetch/peer_fetch_channel.go: if cpfc.channel.Pending == false { peer/fetch/peer_fetch_channel_test.go: if channel.Pending { peer/send/peer_send_channel_test.go: if channel.Pending { peer/send/peer_send_channel.go: cpsc.channel.Pending = false peer/send/peer_send_channel.go: if cpsc.channel.Pending == false { ``` Edit: This may be related to #33.
Owner

In Cwtch, Servers and Peers are different - Servers are used as a way of proving asynchronous messaging and group message anonymity.

There is a cwtch server run by us at 53gt5ixjrfzoik5i - if you create a group with that server and invite peers to that group it should work.

This is something we need better documentation around, especially for explaining lower level concepts

The flow for setting up and messaging a group looks like this (not including the invite-to-group to share with other peers):

    cwtch [sarah]> new-group 53gt5ixjrfzoik5i
    Setting up a new group on server:53gt5ixjrfzoik5i
    New Group [b7fc20e3f9369523dc1ad21b6a880936] created for server 
    53gt5ixjrfzoik5i
    cwtch [sarah]> servers
    Name: 53gt5ixjrfzoik5i Status: 3
    cwtch [sarah]> send b7fc20e3f9369523dc1ad21b6a880936 hello
    cwtch [sarah]> timeline b7fc20e3f9369523dc1ad21b6a880936
    2018-08-03 15:04:54 -0700 PDT sarah (ogyogoytizc7jrzv): hello [verified]

`

In Cwtch, Servers and Peers are different - Servers are used as a way of proving asynchronous messaging and group message anonymity. There is a cwtch server run by us at 53gt5ixjrfzoik5i - if you create a group with that server and invite peers to that group it should work. This is something we need better documentation around, especially for explaining lower level concepts The flow for setting up and messaging a group looks like this (not including the `invite-to-group` to share with other peers): cwtch [sarah]> new-group 53gt5ixjrfzoik5i Setting up a new group on server:53gt5ixjrfzoik5i New Group [b7fc20e3f9369523dc1ad21b6a880936] created for server 53gt5ixjrfzoik5i cwtch [sarah]> servers Name: 53gt5ixjrfzoik5i Status: 3 cwtch [sarah]> send b7fc20e3f9369523dc1ad21b6a880936 hello cwtch [sarah]> timeline b7fc20e3f9369523dc1ad21b6a880936 2018-08-03 15:04:54 -0700 PDT sarah (ogyogoytizc7jrzv): hello [verified] `
Owner

Created #109 to make this path better and less confusing.

Created #109 to make this path better and less confusing.
Author

i totally confused this and thought every peer can automatically be a server. now that I think about it makes no sense, so it's good to warn the user to not make silly choices.

also found the suggestions invite-to-group let's me select a group id as first paramenter instead of a peer.

i totally confused this and thought every peer can automatically be a server. now that I think about it makes no sense, so it's good to warn the user to not make silly choices. also found the suggestions `invite-to-group` let's me select a group id as first paramenter instead of a peer.
Author

Conclusion: It's not possible to create a group on a peer address, the error message should be more descriptive:

This is a peer address. Groups can only be created on a server.

Conclusion: It's not possible to create a group on a peer address, the error message should be more descriptive: > This is a peer address. Groups can only be created on a server.
Owner
  • invite-to-group - select a group id as first paramenter instead of a peer.
* [x] invite-to-group - select a group id as first paramenter instead of a peer.
Owner

Parameters of invite-to-group was switch in Dans last PR, closing this.

Parameters of invite-to-group was switch in Dans last PR, closing this.
sarah closed this issue 2018-10-03 04:39:52 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch#106
No description provided.