status-web icon indicating copy to clipboard operation
status-web copied to clipboard

Online Status

Open D4nte opened this issue 3 years ago • 7 comments

Being able to send and receive information about being online.

D4nte avatar Oct 06 '21 10:10 D4nte

@cammellos Is there and if so, what is, the protocol to check if someone is "online"?

D4nte avatar Oct 22 '21 00:10 D4nte

@Parveshdhull will have the details, would you mind replying to @D4nte please? Thanks!

cammellos avatar Oct 22 '21 08:10 cammellos

Hi @D4nte, The user broadcasts its own online status to its own contact code topic and other users who subscribes to that topic (contacts or community members) will receive his/her online status in new.messages. You can check more details about types of status and other specs, here

Parveshdhull avatar Oct 22 '21 08:10 Parveshdhull

Thanks. I believe @Szymx95 is attempting an implementation.

D4nte avatar Oct 26 '21 06:10 D4nte

@Parveshdhull

Status messages are sent into specific topics:

With communities, a topic derived from the community-id with the suffix -ping concatenated. To know the status of a contact, their updates will be sent in their "contact-code" topic

If i understand correctly status messages can be sent to either user specific topic or to community-id+'-ping' topic

message StatusMessage {
  uint64 clock = 1
  
  StatusType status_type = 2;
    
  string custom_text = 3
  
  enum StatusType {
    UNKNOWN_STATUS_TYPE = 0;
    ONLINE = 1;
    DO_NOT_DISTURB = 2;
  }
}

Can I add a field for nickname that broadcasting wants to be seen under, or will this break the spec (i.e. are the fields here only ones that are available or are they just minimum for the spec ) ?

Szymx95 avatar Oct 26 '21 08:10 Szymx95

Hi @Szymx95,

If i understand correctly status messages can be sent to either user specific topic or to community-id+'-ping' topic

A user only sends status messages to his/her own contact topic and other users subscribe to that topic. For Ex. if a user has 100 contacts, then the user will not send his status to all 100 of them, the user will only send his status update to his own contact topic.

  • status_update.proto is changed, please use this one.
  • Is this nickname also getting modified as same as status? otherwise, it will not be useful to carry an extra field that is not being modified. Also, it will cost extra bandwidth and storage at the mail server per status update. So better to transfer the nickname with contact information.

Parveshdhull avatar Oct 26 '21 11:10 Parveshdhull

Regarding the nickname, will wait for a consensus to be reached on Status core side first. Tracked by @John-44

D4nte avatar Oct 27 '21 05:10 D4nte