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

User Scope web App Nodejs #1312

Merged
merged 13 commits into from
Oct 20, 2024
Merged

Conversation

Mohammed-MSFT
Copy link
Contributor

No description provided.

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.

please fix all comments.

MicrosoftAppPassword = "<<MicrosoftAppPassword>>"
MicrosoftAppTenantId = "<<MicrosoftAppTenantId>>"
AllowedHosts = "*"
notificationUrl= "<<BaseUrl>>/api/notifications"
Copy link
Collaborator

Choose a reason for hiding this comment

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

To avoid duplicate entry, can you please use relative path for notificationUrl. It should be "/api/notifications". Internally you can add BaseUrl.

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

Copy link
Contributor Author

@Mohammed-MSFT Mohammed-MSFT Jul 2, 2024

Choose a reason for hiding this comment

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

so you want me to add only this "/api/notifications" right ?, I have updated please check it once and provide your feedback comment.

/** Creates Subscription for Team */
const createTeamAsync = async (req, res) => {
var teamId = req.query.teamId;
var subsId = "2";
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this hardcoded?

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

/** Creates Subscription for UserSCope Chats */
const subscribeToSpecificChat = async (req, res) => {
var chatId = req.query.chatId;
var subsId = "3";
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove hardcodings from everywhere, and from where we are using subsId?

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

* @param {pageId}. Team and channel subscription.
*/
static async createSubscription(id, token, subsId) {
console.log(new Date(Date.now() + 3600000).toISOString())
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove un-necessary console logs from everywhere

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

let changeType = "";

switch (subsId) {
case '1':
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of numbering, we can use proper text for understanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, updated In all places.

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!

This is a sample application which demonstrates use of Team/Channel and User Scope Graph subscription that will post notifications when user create/edit/delete team/channel.

## Included Features
* Tabs

Choose a reason for hiding this comment

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

Are there tabs in this feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated..

npm install
```

Run your app

Choose a reason for hiding this comment

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

In this section, would you mind putting more details on how actually to run the demo?

I recall there were two parts, server + client, and you needed to run some command from VSCode directly. Those details would make it clear how to run the demo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok sure.


// Fetch teams group chat list
const fetchTeamsLeftRail = async (userID, token) => {
var resp = await axios.get(`/api/changeNotification/getAllChats?userId=${userID}&token=${token}`);

Choose a reason for hiding this comment

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

Curious what this API is? I have never seen this before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Custom API method to fetch all chats from actual Graph API base on respective userid

image

This is the actual API
image

Copy link
Contributor

@Harikrishnan-MSFT Harikrishnan-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 Good, Approving!

@Pawank-MSFT
Copy link
Collaborator

Pawank-MSFT commented Oct 17, 2024

@Mohammed-MSFT
Copy link
Contributor Author

@Mohammed-MSFT Mohammed-MSFT merged commit 9eb7332 into main Oct 20, 2024
268 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