Node:set-unread, Next:set-motd-of-lyskom, Previous:who-is-on-old, Up:Protocol Requests
set-unread [40] (( conf-no : Conf-No;
no-of-unread : INT32 ))
-> ( );
Only read the last no-of-unread in the conference conf-no.
This call modifies the last-text-read of current person's
membership for the conference. This call is sometimes used to
implement the "only read last N texts" command found in many
clients. Due to possible race conditions1, this call is usually
better implemented using the set-last-read
call
which explicitly sets the last-text-read field of the
membership.
Example:
1 9 5 6
=1 1 34 21 17 6 97 4 197 1 6 100 0 0 *
1 40 6 0
=1
1 9 5 6
=1 1 34 21 17 6 97 4 197 1 6 100 4 0 *
This example shows that person 5 last read text 0 in conference 6 (and since 0 is an illegal local text number, that implies that the person has not read anything in the conference.) After calling set-unread and asking to have zero unread texts in conference 6, this is reflected by the call to query-read-texts.
login-first
undefined-conference
conf-no does not exist or is secret.
not-member
conf-no.
Another client might
create a new text immediately before the server processes this
set-unread call, so you might end up setting
last-text-read to something unexpected.