Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable13] Set "share with" field to the ID of the circle #8905

Merged

Conversation

danxuliu
Copy link
Member

Backport of #8843

When a share is shared with a circle the "share_with" field returned by
the API endpoint was always set to the name of the circle. However, the
name is not enough to identify a circle. The Circles app now provides
the ID of the circle in the "shared with" field of a Share, so this
commit modifies the API endpoint to set the "share_with" field to the ID
of the circle when provided by the Circles app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Before, the avatar for a circle share was generated using the
"share_with" field as the seed for "imageplaceholder". Due to this, when
the "share_with" field is set to the circle ID the character shown in
the avatar was just a random character instead of the first character of
the display name. Now the "share_with" is still used as the seed for the
colour, but the display name is used as the text of the avatar.

This adds support for "share_with" fields set to the circle ID while
being backwards compatible with "share_with" fields set to the circle
name.

Note that when "share_with" fields is set to the circle name the colour
of the avatar is different in the list of suggested sharees and in the
list of current sharees, but that also happened before these changes
(due to a different seed being used in each place).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@codecov
Copy link

codecov bot commented Mar 20, 2018

Codecov Report

Merging #8905 into stable13 will decrease coverage by <.01%.
The diff coverage is 14.28%.

@@              Coverage Diff               @@
##             stable13    #8905      +/-   ##
==============================================
- Coverage       51.33%   51.33%   -0.01%     
- Complexity      25022    25025       +3     
==============================================
  Files            1609     1609              
  Lines           95290    95294       +4     
  Branches         1376     1376              
==============================================
+ Hits            48920    48921       +1     
- Misses          46370    46373       +3
Impacted Files Coverage Δ Complexity Δ
core/js/sharedialogshareelistview.js 45.22% <ø> (ø) 0 <0> (ø) ⬇️
...iles_sharing/lib/Controller/ShareAPIController.php 67.09% <0%> (-0.59%) 158 <0> (+3)
core/js/sharedialogview.js 75.43% <100%> (ø) 0 <0> (ø) ⬇️
apps/files_trashbin/lib/Trashbin.php 72.28% <0%> (-0.25%) 136% <0%> (ø)
core/js/js.js 66.4% <0%> (+0.11%) 0% <0%> (ø) ⬇️
lib/private/Files/Cache/Propagator.php 96.2% <0%> (+1.26%) 16% <0%> (ø) ⬇️

@rullzer rullzer merged commit 52a97e8 into stable13 Mar 20, 2018
@rullzer rullzer deleted the stable13-8843-set-share-with-field-to-the-id-of-the-circle branch March 20, 2018 22:17
@MorrisJobke MorrisJobke mentioned this pull request Apr 18, 2018
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants