Conversation
alcpereira
left a comment
There was a problem hiding this comment.
Thanks for this great contribution!
To finish this work, we need some tests on this feature. At least unit tests for the isolated logic of the naming fallback, and later some e2e tests once we fix the MOCK_USER discussion.
| smallestUnit: "minute", | ||
| roundingMode: "ceil", | ||
| }); | ||
| const timeNow = Temporal.Now.plainTimeISO() |
There was a problem hiding this comment.
Worth adding a comment here.
server/config/passport.js
Outdated
| profile.discriminator.length === 4 | ||
| ? `${profile.username}#${profile.discriminator}` | ||
| : profile.username; | ||
| // console.log('Scopes:', currentReq); |
There was a problem hiding this comment.
I guess this is a leftover from development.
server/config/passport.js
Outdated
| console.log(error); | ||
| console.log("User guild name could not be found."); |
There was a problem hiding this comment.
| console.log(error); | |
| console.log("User guild name could not be found."); | |
| console.log("User guild name could not be found with the error: ", error); |
server/config/passport.js
Outdated
| ); | ||
| const guildDisplayName = guildMember?.nick || profile.username; | ||
|
|
||
| console.log(guildDisplayName); |
There was a problem hiding this comment.
| console.log(guildDisplayName); |
server/config/passport.js
Outdated
| console.log("User guild name could not be found."); | ||
| } | ||
|
|
||
| const guildMember = profile.guilds.find( |
There was a problem hiding this comment.
Isn't it the same thing as is100Dever?
server/config/passport.js
Outdated
| } | ||
| ); | ||
| const devMemberData = await devMemberInfo.json(); | ||
| // console.log(devMemberData.nick, devMemberData.user) |
There was a problem hiding this comment.
| // console.log(devMemberData.nick, devMemberData.user) |
server/config/passport.js
Outdated
| : profile.username; | ||
| // console.log('Scopes:', currentReq); | ||
|
|
||
| let displayName = profile.global_name ?? profile.username; |
There was a problem hiding this comment.
I think we need to document this whole bit of code, or even move it to its own function.
If I understand correctly there are:
profile.global_name: Regular "Display Name" in Discord (My Accounts tab)profile.username: Full Discord username (My Accounts tab)devMemberData.nick: A specific Discord nickname for the server (Profiles > Per- server Profiles tab)
If the user is not from 100devs, we should not even fetch the endpoint users/@me/guilds/735923219315425401/member
Make it clear about the logic of the fallback, I guess it should be (Server nick > Display Name > User name).
There was a problem hiding this comment.
Now that I think of it, this definitely needs documentation and tests!
server/config/passport.js
Outdated
| // console.log(devMemberData.nick, devMemberData.user) | ||
| if (devMemberData.nick) { | ||
| displayName = devMemberData.nick; | ||
| } else if (profile.discriminator.length === 4) { |
There was a problem hiding this comment.
This has been deprecated in 2024 (here). We can completely remove this bit of code.
bump packages that won't break production; removed package and updated files using said package
check if user is moderator, allow to delete any event API unit tests add verification of deleting to integration test add unit tests add unit test for non moderator to delete their own event add moderator to discord mocking clear db refactor: change cra to vite and monorepo setup typo: to have been called with add passport discord mocking to routes tests add is moderator flag to mocked moderator refactor for preventing non moderator deletion test refactors add moderator logic to passport add ismoderator flag to passport discord mocking flip moderator logic update tests Updated the landing page 'Contributing Together' portion. fix: callback auth path issue export responses from passport discord mocking passport call mock discord responses create test users in the tests map auth headers to database users passport discord mocking call directly again remove logs from events.js remove ismoderator flag from pasport discort mocking add frontend validation fix: remove spaces in .env.example keys add isModerator flag to mock user passport: set profile to false, remove update ismoderator status event modal: update variable name add comment to server/middleware/auth.js Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com> remove bla bla
This reverts commit 4d3c947.
Add trust proxy setting to enable HTTPS detection behidn Fly.io proxy. Fixes issue Together-100Devs#466
This reverts commit d40983b which had reverted the original cookie max age feature. The cookie max age functionality is needed for proper session management. Addresses issue Together-100Devs#599
add intelagense to codeowners
move the help text from the wiki to the docs
Delete client/src/setupProxy.js Added title and aria-label attributes to CalendarHeader.jsx Revert "Added title and aria-label attributes to CalendarHeader.jsx" This reverts commit 39c52a6. client/src/features/calendarHeader/CalendarHeader.jsx reverted adding title/aria-label attributes to calendarHeader.jsx Remove http-proxy-middleware from client and update codebase Undo title and aria-label changes for CalendarHeader.jsx
Complete requested changes Edit Discord 0Auth2 Docs Edit Discord 0Auth2 Docs Fixed button screenshot Trying to get image to load correctly Finish Discord 0Auth2 Setup instructions Note to check login Fix redirect button image Fix localhost link
made sure that only title will be visible for mobile with truncate and ellapsis
changes Co-authored-by: Devin Lane <devin.c.lane@gmail.com>
changed constant for reccurring days destructured constant coreectly adjusted e2e test createform changed note text on form regardding recurring events cleaned up variable names and xport of constants removed empty space added JSDOC to constants.js feature 531 corrected JSDOC implementation
…into feature#482
|
This conversation has moved over to #658, so i'm closing this PR |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Additionally, please include reasoning if tests have failed.
This PR includes several changes, including:
Type of change
Please select everything applicable. Please, do not delete any lines.
Issue
Checklist:
npm run testandnpm run test:e2eand all tests have passed successfully or I have included details within my PR on the failure.npm run lintand resolved any outstanding errors. Most issues can be solved by executingnpm run format