Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications in scrollback when a user activates or deactivates “away” #21

Closed
zarino opened this issue Jul 11, 2015 · 1 comment
Closed

Comments

@zarino
Copy link
Owner

zarino commented Jul 11, 2015

We'll need to poll the server for user status. Probably more efficient to do this using client.send('WHO', '#channelName') than to maintain a list of users we've seen in all the channels on the server and query each one with client.whois() individually.

The response to a raw WHO command will be sent in a raw event, with one event per user. The events all have a command attribute of 'rpl_whoreply'.

Looks like the interesting bits of the response to a raw WHO command are:

[raw] {
  server: 'irc.server.org',
  command: 'rpl_whoreply',
  …
  args: [ 
    'MyNick',
    '#channelName',
    'TheirUsername',
    'TheirHost',
    'irc.server.org',
    'TheirNick',
    'H',
    '0 TheirFullName'
  ]
}

This is repeated for each user in the channel. the 7th item in the args array is the status, H for “Here” and G for “Gone”. Looks like it can be followed by characters like * or @ if the user is an admin too.

@zarino
Copy link
Owner Author

zarino commented Jul 12, 2015

4a1ce66 includes some work towards this, polling each channel for user statuses and then updating their userButtons when they go away / come back.

As for putting the status in the scrollback, I’m starting to wonder what the benefit is of historical away activity. If a conversation is happening in a channel, do I really want a completely unrelated line popping up, recording the fact that some unrelated person set themselves as away?

Thinking about it, the times I'm interested in someone's status are:

  1. When speed of response is important, and I want a heads-up, before starting a direct message whether the ideal person is likely to respond quickly, or whether I should ask someone else / not ask the question at all.
  2. When I'm mid-chat with someone and they're not responding – or someone's been mentioned and they've not responded yet. Knowing if they're “away” would help explain their silence.

Both of these can be achieved by displaying users’ current status in the sidebar. Neither of them require a historical record of "this user went away at this point and came back at this point" in the channel scrollback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant