Closed (fixed)
Project:
Chatroom
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Reporter:
Anonymous (not verified)
Created:
12 Jul 2006 at 00:19 UTC
Updated:
21 Sep 2021 at 20:41 UTC
Jump to comment: Most recent
Comments
Comment #1
pacheco commentedi remember you gave me a good reason about why we can't really know when someone is away:
the person could just be reading the conversation, and so is not away
but if we can find a way to make this distinction it would be a nice feature IMHO
Comment #2
Anonymous (not verified) commentedyes, i remember that :-)
this will require that the users clicks a button or something, that sends an update to the server that sets their status to away (so we probably need another column in the chatroom_online_list table).
then, we need to send this status down to the browser, and update the user's list item class.
Comment #3
moshe weitzman commentedi would think that presence info (i.e. online vs away) can be calculated just like who's online block ... if someone is just idly reading a chat room, they might time out though because their updates don't reach the bootstrap (or maybe sess_write() takes care of this).
Comment #4
Anonymous (not verified) commentedwhether someone is idle or not is not quite the determining factor re. bootstrap - its whether or not a message has been written to the chat.
every message write operation updates the timestamp for the chat, which means we get a cache miss for everyone except the message poster, which leads to an update of all the readers online time, and every 4 update requests, an updated list of who is online is sent down.
have a look at chatroom_read_msgs and chatroomread.php to get a feel for it. this could probably do with an overhaul.
explaining that makes me think it might be worth adding some code to check for user online updates after X cache hits. this will make sure the user list status doesn't stagnate if there haven't been any new messages.
sound like a useful feature?
Comment #5
moshe weitzman commentedyes, it is very useful to know who is really in the room even if the room is not aqctive recently ... thanks for the explanation
Comment #6
Anonymous (not verified) commentedfirst hacky code for this is now in cvs.
db changes are required for this - check the install file to see the new columns.
the css of the user list item is toggled - now we just need some fancy css!
Comment #7
pacheco commentedjusting i changed:
to:
did i rear you say "fancy" :)
let me see that now...
Comment #8
Anonymous (not verified) commentedgood catch paulo!
i've added some more functionality to this, so we're almost there.
- the user list always has the current user at the top
- completed /away and /back basic functionality
toggles css class in user list (though its butt ugly at the moment) and writes a "username is away" message for everyone except the user who went away.
does what you'd expect.
need to pretty up the css away class, and add another way (maybe an icon next to the username? maybe a button in the text submit area? moshe, dave, got any thoughts on this?) to allow users to mark themselves as away.
Comment #9
pacheco commentedhmm cool, i was not understanding how users would became away, was think you had figured how to make it automatic...
will think a litlle about UI for this...
Comment #10
Anonymous (not verified) commentedi committed a silly away image, and made the username slightly transparent when away - try it out.
i'd still like a way other than the commands to go away/come back.
Comment #11
pacheco commentedjustin, commited first UI implementation on that, please review...
Comment #12
Anonymous (not verified) commentedhi paulo,
nice work! i like the clock icon and the check box.
i've added a one-liner to link /away and /back then typed in to toggling the box, so i think feature is done for now.
Comment #13
Anonymous (not verified) commented