feat(server): support comment notification type (#12924)
#### PR Dependency Tree * **PR #12924** 👈 * **PR #12925** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced comment and comment mention notifications, including email notifications when users are mentioned or receive comments on documents. * Added new email templates for comment and comment mention notifications. * Users can now control whether they receive comment-related emails via a new user setting. * **Bug Fixes** * None. * **Documentation** * Updated GraphQL schema documentation to reflect new notification types and user settings. * **Refactor** * Streamlined and enhanced test coverage for notification and user settings, including comment notifications. * **Chores** * Improved test setup and snapshot coverage for user settings and notifications. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -128,12 +128,14 @@ type DocPathParams = {
|
||||
mode: DocMode;
|
||||
blockId?: string;
|
||||
elementId?: string;
|
||||
commentId?: string;
|
||||
replyId?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* To generate a doc url path like
|
||||
*
|
||||
* /workspace/{workspaceId}/{docId}?mode={DocMode}&elementIds={elementId}&blockIds={blockId}
|
||||
* /workspace/{workspaceId}/{docId}?mode={DocMode}&elementIds={elementId}&blockIds={blockId}&commentId={commentId}&replyId={replyId}
|
||||
*/
|
||||
export function generateDocPath(params: DocPathParams) {
|
||||
const search = new URLSearchParams({
|
||||
@@ -145,5 +147,11 @@ export function generateDocPath(params: DocPathParams) {
|
||||
if (params.blockId) {
|
||||
search.set('blockIds', params.blockId);
|
||||
}
|
||||
if (params.commentId) {
|
||||
search.set('commentId', params.commentId);
|
||||
}
|
||||
if (params.replyId) {
|
||||
search.set('replyId', params.replyId);
|
||||
}
|
||||
return `/workspace/${params.workspaceId}/${params.docId}?${search.toString()}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user