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

Update all sample codes to add await and async for initialize function #1008

Merged
merged 11 commits into from
Nov 21, 2023

Conversation

Harikrishnan-MSFT
Copy link
Contributor

No description provided.

@Harikrishnan-MSFT
Copy link
Contributor Author

function facebookLogin() {
microsoftTeams.authentication.notifySuccess('facebooklogin');
}
function usingCredentialsLogin() {

Copy link
Contributor

Choose a reason for hiding this comment

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

remove extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -8,7 +8,8 @@
integrity="sha384-lIk8T3uMxKqXQVVfFbiw0K/Nq+kt1P3NtGt/pNexiDby2rKU6xnDY8p16gIwKqgI" ,
crossorigin="anonymous"></script>
<script>
microsoftTeams.app.initialize();
microsoftTeams.app.initialize().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please try once with await microsoftTeams.app.initialize()

@@ -14,7 +14,8 @@
<button onclick="selectHeroCards()">Hero Cards</button>
<script>
$(document).ready(function () {
microsoftTeams.app.initialize();
microsoftTeams.app.initialize().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please try once with await microsoftTeams.app.initialize()

@@ -18,7 +18,8 @@
<script src="https://res.cdn.office.net/teams-js/2.0.0/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script>

<script>
microsoftTeams.app.initialize();
microsoftTeams.app.initialize().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please try once with await microsoftTeams.app.initialize()

@@ -86,7 +86,8 @@

<script type="text/javascript">
$(document).ready(function () {
microsoftTeams.app.initialize();
microsoftTeams.app.initialize().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please try once with await microsoftTeams.app.initialize() and make the function async

@@ -30,7 +30,8 @@

<script>

microsoftTeams.app.initialize();
microsoftTeams.app.initialize().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please try once with await microsoftTeams.app.initialize()

Copy link
Contributor

Choose a reason for hiding this comment

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

Please update at all places if above code works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @Prithvi-MSFT

I have tried, as per your PR comments, to await microsoftTeams.app.initialize(), but i am getting this error.

image

image

@Harikrishnan-MSFT Harikrishnan-MSFT changed the title Update all sample codes to add await for initialize function Update all sample codes to add await and async for initialize function Oct 31, 2023
Copy link
Collaborator

@Pawank-MSFT Pawank-MSFT left a comment

Choose a reason for hiding this comment

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

looks correct., Approving!

@Pawank-MSFT
Copy link
Collaborator

Pawank-MSFT commented Nov 2, 2023

@Harikrishnan-MSFT
Copy link
Contributor Author

@Harikrishnan-MSFT
Copy link
Contributor Author

Harikrishnan-MSFT commented Nov 21, 2023

@Harikrishnan-MSFT
Copy link
Contributor Author

Bug Link -
#988

@Harikrishnan-MSFT Harikrishnan-MSFT merged commit 96690cd into main Nov 21, 2023
503 checks passed
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