set the display name of federated sharees from addressbook#24162
Merged
set the display name of federated sharees from addressbook#24162
Conversation
blizzz
commented
Nov 16, 2020
70690e5 to
8e63cd8
Compare
ChristophWurst
approved these changes
Nov 20, 2020
Member
ChristophWurst
left a comment
There was a problem hiding this comment.
Code makes sense and has tests 🕺
skjnldsv
approved these changes
Nov 20, 2020
Member
Author
|
ah, some more tests to patch |
b8e969e to
9da6061
Compare
Member
Author
and even more of those 🎊 |
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Arthur Schiwon <[email protected]>
7264f97 to
16a78f5
Compare
Member
Author
|
/backport to stable20 |
Member
Author
|
/backport to stable19 |
Member
Author
|
oh f*ck me. While making the tests pass i had a slight adjustment necessary in the logic. Backfired of course. Follow up coming. |
This was referenced Nov 24, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To reproduce:
Expect to see the display name of the user who initiated the share.
Acutal: you see the user's internal(!) id.
Before the fix:
After:
@skjnldsv in the UI only the host is show. But my instances are running within subfolders, e.g. /stable20 was cut off. Intentionally or a bug?
What I am not so happy about is that it adds another SQL query per incoming federated share to figure out the displayname. I don't have a much better ideas though, I hope it is acceptable.
It "boroughs" some code from https://github.com/nextcloud/server/blob/master/apps/federatedfilesharing/lib/Notifier.php#L249 but to clean it up properly will take more changes, but I want to keep it backportable.
It also takes hold of
getDisplayIdwhich is to some degree paradox.Thus, having a bit of mixed feelings at the moment.
Todo