Node:set-unread, Next:, Previous:who-is-on-old, Up:Protocol Requests



set-unread [40] (1) Recommended


        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.

Error codes

login-first
Login required before issuing this call.
undefined-conference
The conference conf-no does not exist or is secret.
not-member
Not a member of conference conf-no.

Footnotes

  1. 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.