[keyserver] add logic to update acknowledgment table
Summary:
The function should be called after detecting login from a proper source.
Functionality:
- a. if there is no record with the given user and policy it means that this is a new one - so It adds a new row
- b. if there is a record with a given user and policy but confirmed is set to 0 it means that policy was updated, so it updated confirmed and date
- c. in any other case do nothing
Test Plan:
Check if described in Summary logic works for:
- new policy
- updated policy
- policy accepted by user previously
Reviewers: atul, marcin, ashoat, tomek
Reviewed By: marcin, ashoat, tomek
Subscribers: ashoat, atul, abosh
Differential Revision: https://phab.comm.dev/D5311