Skip to content

Commit

Permalink
Verify contentUrl can be changed
Browse files Browse the repository at this point in the history
  • Loading branch information
melsener committed Mar 12, 2024
1 parent 3d81d34 commit dfecada
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ export const useConfigurationCreate = ({
microsoftTeams.settings.setSettings({
entityId: configurationId,
configName: resource.name,
contentUrl,
websiteUrl: contentUrl // did not work while trying to open up the update settings page
contentUrl
} as microsoftTeams.settings.Settings, (status, reason) => {
console.log("Set Settings", status, reason);

Check warning on line 121 in src/client/containers/ConfigurationCreateContainer/hooks/useConfigurationCreate.ts

View workflow job for this annotation

GitHub Actions / Check Code Quality

Unexpected console statement
});
Expand Down
8 changes: 8 additions & 0 deletions src/client/containers/LoginContainer/LoginContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ export const LoginContainer: FunctionComponent = () => {
microsoftTeams.settings.getSettings(settings => {
console.log("Settings", JSON.stringify(settings, null, 4));
});

// This works - sets content url as specified
microsoftTeams.settings.setSettings({
contentUrl: decodeURI(`${window.location.origin}${url.getHomeUrl({
channel: "MyRandomChannel",
theme: "{theme}"
})}`)
});
return <Login onButtonClick={login} error={loginError} />;
};

0 comments on commit dfecada

Please sign in to comment.