issue: ENG-7822
We need to fetch avatars for users the client has become aware of. We want the keyserver to remember that the users now know of each other and send an update to the second user.
So we will use the updates to obtain the avatar - we will call an endpoint that will update the relationshipt to "KNOW_OF", if there is no other undirected relationship. This endpoint will create updates if needed
Details
Dispatched updateRelationship with relationshipActions.ACKNOWLEDGE and checked that both users get and update, and if the user has an avatar set, this avatar is sent in the update. Checked in the keyserver db that the users now have a KNOW_OF relationship
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
keyserver/src/updaters/relationship-updaters.js | ||
---|---|---|
257 ↗ | (On Diff #40962) | updateChangedUndirectedRelationships only updates the relationship if there was none, or the relationship status provided it greater than the one in the db. This will not be the case here, because KNOW_OF is 0-the lowest possible value. So we will not override a more meaningful relationship. |
keyserver/src/updaters/relationship-updaters.js | ||
---|---|---|
257 ↗ | (On Diff #40962) | Makes sense, but is there an easy way of checking if the relationship doesn't need to be updated? |
keyserver/src/updaters/relationship-updaters.js | ||
---|---|---|
257 ↗ | (On Diff #40962) | The only thing this function does is checking if the relationship needs to be updated, and if so updates it. So I don't think it makes sense to duplicate this logic. |