We should create a meta issue on the tracker to track progress of history playback shortcomings, lack of documentation and CHATHISTORY spec usage/modifications (e.g. target=* usage and detached channel playback). Constraints: - Several clients per user, - Some clients support CHATHISTORY, others don't, - Upstream channels, - Upstream *detached* channels - highlights/messages are transmitted as NOTICE, or - the client is reattached accordingly, - Upstream queries. Goal: play back history - the user musn't miss a message/highlight, - the user shouldn't be served the same messages/highlights notices twice. IMO, first TODO is make some kind of state diagram to make out all cases and workflows, e.g. client connects -> (if no chathistory -> play back channels, detached channels -> reattach detached channels accordingly) OR (if chathistory -> *insert client workflow to retrieve all needed history*) Tools used to play back history: - delivered PINGs: know which message has last been sent to a device, - READ: know which message has last been seen by the user, - CHATHISTORY: let the client do the work instead of us. TODO: define alternatives/best efforts to make when one of these tools isn't available.