-
Notifications
You must be signed in to change notification settings - Fork 21
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
🐛 Fix email notification link #738
Conversation
MontaGhanmy
commented
Nov 20, 2024
•
edited
Loading
edited
tdrive/backend/node/src/services/documents/services/engine/index.ts
Outdated
Show resolved
Hide resolved
@@ -25,6 +35,33 @@ export class DocumentsEngine implements Initializable { | |||
return; // Early return on unknown event type | |||
} | |||
|
|||
const encodedCompanyId = translator.fromUUID(e.item.company_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract this part to a one function with two params, item or item path, and receiver. And have the next test cases:
- file created in the folder that I've shared and the folder Is in: my drive, shared drive
- the file was shared with me
- any other cases that I forgot)
I home we will refactor it later, when we refactor UI routings wot have one file URL
@@ -125,9 +125,15 @@ export const eventToTemplateMap: Record<string, any> = { | |||
[DocumentEvents.DOCUMENT_SAHRED]: "notification-document-shared", | |||
}; | |||
|
|||
export enum NotificationActionType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and what does it mean, "direct" or "update" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "direct" is a user A share folder/file with user B.
- "update" is user B does an update on a file/folder shared by user A. (this could be also an anonymous user through public links)
const mockPayload = ( | ||
type: NotificationActionType, | ||
overrides: Partial<NotificationPayloadType> = {}, | ||
) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: NotificationPayloadType
this way the as
s bellow aren't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would require specifying all the properties of NotificationPayloadType even for test cases where they're irrelevant. It makes it even more complicated.
tdrive/frontend/src/app/features/router/services/router-service.ts
Outdated
Show resolved
Hide resolved
@@ -54,6 +54,7 @@ export const DocumentRow = ({ | |||
: 'hover:bg-zinc-500 hover:bg-opacity-10 ') + | |||
(className || '') | |||
} | |||
id={item.id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we either use another attribute (eg: data-item-id={item.id}
with querySelector
), or if we really want id
, then prefix it in case we have multiple items on screen representing the same driveitem