Correspondent information structure
See pages:
examine;
correspondent;
contact;
The LSV holds an array of these, indexed by CoNo.
CoNo is an integer starting from 1. CoNo remains the identifier whether or not a correspondent has been contacted.
CoNo is not called CoID, because it is personal to each user, and sequential,
the better to avoid confusion with the GUID for that user.
CoNo is stored and transmitted as a Key Variable, but CoNo is also stored in the structure in localStorage, as well as being used to create the name for that local storage.
So there is some duplication, hopefully helpful rather than confusing.
- CoNo: the correspondent's number for current user
- CoRegDate: date that the correspondent registered on the system
- ContactB: whether in contact
- ContactDate: date on which contact established
- CoStatus: status for that correspondent for me (see below)
- CoMyStatus: my status with that correspondent (see below)
- CoNick: what I want to call this correspondent / contact
- CoName: contact name (the MyName for contacts)
- MyName: what I want them to call me (shows up for them as CoName)
- CoDetails: shared contact details (for contacts)
- CoEmail: contact e-mail
- CoEIDs: array of Enq ID that fit correspondent (see enquiry)
- for each corresponding Enq ID in CoEIDs:
- CoELat
- CoELong
- CoEDistance: may be stored for convenience, though dependent
- CoListDate: date that correspondence on that enquiry was listed
- for each Q asked by correspondent and used in any correspondence:
- for each for each Q asked by me and used in correspondence
- CoBreakNote: (for contacts)
- MyBreakNote: (for contacts)
- AbuseB: (for contacts)
- AbuseNote: (for contacts)
- AbuseType: (for contacts)
Correspondent table on local server
- my LUID
- my correspondent number
- my status for that correspondent
- their GUID
When I am asking about a correspondent, I send my correspondent number (and my LUID)
local server looks up their GUID to send to hub.
When information comes via hub, local server translates to my correspondent number.
- unknown
- blocking
- inviting
- breaking
Transition rules
- CoMyStatus start off unknown
- Co is displayed if:
- Correspondent appears in my enquiry results
- CoMyStatus is invited
- If CoStatus is unknown, I can change it to inviting or blocking
- When I change CoStatus to blocking:
- CoMyStatus: inviting is changed to unknown
- CoMyStatus: breaking is changed to blocking
- Contact details are erased
- If CoStatus is blocking, I can change it back to unknown
- When Co changes CoMyStatus to blocking
- CoStatus unknown or inviting → unseen, and stays there
- If CoStatus is inviting, I can change to unknown or blocking
- While CoStatus is inviting, Co can set CoContact to true
- If CoMyStatus is inviting, I can change CoStatus to blocking or contacted
- While CoMyStatus is inviting,
- I can change CoStatus to blocking, making CoMyStatus unknown
- I can change both to contacted
- If CoStatus is contacted, CoMyStatus can only be contacted or breaking
- If CoMyStatus is contacted, I can change CoStatus to breaking
- If CoMyStatus is breaking, accepting break changes CoStatus to unknown; when this happens, contact details are erased
- If CoStatus is breaking, I can revert it to contacted
- If CoStatus is breaking, and Co accepts break, CoStatus becomes unknown