Skip to content

Added comments for ContactStore save and update methods - #3551

Merged
tomholub merged 1 commit into
masterfrom
issue-3536-contact-store-docs
Apr 12, 2021
Merged

Added comments for ContactStore save and update methods#3551
tomholub merged 1 commit into
masterfrom
issue-3536-contact-store-docs

Conversation

@rrrooommmaaa

@rrrooommmaaarrrooommmaaa commented Apr 11, 2021

Copy link
Copy Markdown
Contributor

This PR adds description to save and update methods of ContactStore.

close#3536


Tests(delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

* The `pubkey` property will be used only to add or update a pubkey record by the pubkey fingerprint.
* Null value of `pubkey` won't affect any pubkey records.
* The `pubkeyLastCheck` property can be set to a non-null value only when `pubkey` specified
* and will be applied only to that specific pubkey record. Missing or null `pubkeyLastCheck` will

@rrrooommmaaarrrooommmaaaApr 11, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bit inconsistent behaviour. We can reset name and lastUse properties of the contact by providing null values in the update parameter, whereas pubkeyLastCheck will be ignored if null is provided. It's impossible to reset it. Should we do property existence check on it as with other properties or leave as it is, @tomholub ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name and lastUse should not be ever reset (no point setting name from something to null, and no point setting lastUse from something to null either). Thanks for noticing!

@tomholubtomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged this one in - behavior change can be done in a followup PR.

@tomholub
tomholub merged commit d7532cf into masterApr 12, 2021
@tomholub
tomholub deleted the issue-3536-contact-store-docs branch April 12, 2021 06:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unify ContactStore save and update

2 participants

@rrrooommmaaa@tomholub