Skip to content

Commit

Permalink
Use the project name; not project ID when asking to collab. Fix #1377
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Jul 7, 2023
1 parent 1aebe78 commit 53d545f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/gui-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,20 +633,28 @@ IDE_Morph.prototype.respondToFriendRequest = async function (request) {
};

IDE_Morph.prototype.respondToCollaborateRequest = async function (request) {
const metadata = await this.cloud.getProjectMetadata(request.projectId);
const dialog = new DialogBoxMorph(
this,
async () => {
await this.cloud.respondToCollaborateRequest(request.id, true);
// TODO: ask if you want to open it now
const dialog = new DialogBoxMorph();
dialog.askYesNo(
localize('Open Shared Project?'),
localize('Would you like to open the shared project now?'),
this.root(),
);
dialog.ok = async () => {
const source = new SharedCloudProjectsSource(this);
await source.open(metadata);
};
},
);
dialog.labelString = 'Respond to Collaborate Request';
dialog.key = request.id;

// TODO: get the name of the project
//const metadata = await this.cloud.getProjectMetadata(request.projectId);
const textString = request.sender + localize(' has invited you to collaborate on') +
//'\n\n' + metadata.name + '.\n\n' + localize('What would you like to do?');
'\n\n' + request.projectId + '\n\n' + localize('What would you like to do?');
'\n\n' + metadata.name + '\n\n' + localize('What would you like to do?');
const txt = new TextMorph(
textString,
dialog.fontSize,
Expand Down

0 comments on commit 53d545f

Please sign in to comment.