Skip to content

Implement simple location sharing#1392

Open
vshcherb wants to merge 70 commits into
masterfrom
ws-test
Open

Implement simple location sharing#1392
vshcherb wants to merge 70 commits into
masterfrom
ws-test

Conversation

@vshcherb

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.

Comment thread java-tools/OsmAndServer/src/main/java/net/osmand/server/ws/UserTranslation.java Outdated
@alisa911 alisa911 requested a review from RZR-UA June 8, 2026 12:33
@alisa911 alisa911 changed the title Ws test Implement simple location sharing Jun 8, 2026
Comment on lines +373 to +385
public void requestShare(UserTranslation ust, CloudUser user) {
if (isAllowedToShare(ust, user.id)) {
return;
}
String nickname = getNickname(user);
ust.getPendingShareRequests().put(user.id, nickname);
saveTranslationToRedis(ust);
Map<String, Object> data = new HashMap<>();
data.put("translationId", ust.getId());
data.put("userId", user.id);
data.put("nickname", nickname);
notifyUser((int) ust.getOwner(), USER_UPD_TYPE_SHARE_REQUEST, data);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure that we need to "ask for the permission", at all. The translation ID is unique enough to serve as "permission automatically granted". Consider removing useless features such as request/grant/deny share.

Sign up for free to 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.

4 participants