From 7d8d7b0fbc26b99b750d493bbd8bfb8b2d1ec208 Mon Sep 17 00:00:00 2001 From: not-meet Date: Sat, 30 Nov 2024 20:33:35 +0530 Subject: [PATCH 01/16] made changes in the pr as per the comments removed unused code for the best practice --- QuickRepliesApp.ts | 3 + README.md | 1 + src/commands/CommandUtility.ts | 6 + src/definition/handlers/IHandler.ts | 1 + src/handlers/ExecuteActionButtonHandler.ts | 2 + src/handlers/ExecuteBlockActionHandler.ts | 2 + src/handlers/Handler.ts | 10 ++ src/modal/createModal.ts | 157 ++++++++++++--------- 8 files changed, 119 insertions(+), 63 deletions(-) diff --git a/QuickRepliesApp.ts b/QuickRepliesApp.ts index 48a0d53..8eab81b 100644 --- a/QuickRepliesApp.ts +++ b/QuickRepliesApp.ts @@ -36,6 +36,7 @@ import { settings } from './src/config/settings'; export class QuickRepliesApp extends App { private elementBuilder: ElementBuilder; private blockBuilder: BlockBuilder; + public params: Array; constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) { super(info, logger, accessors); } @@ -141,6 +142,7 @@ export class QuickRepliesApp extends App { http, persistence, modify, + this.params, context, ); @@ -160,6 +162,7 @@ export class QuickRepliesApp extends App { http, persistence, modify, + this.params, context, ); diff --git a/README.md b/README.md index c495576..7a5a8cc 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ By selecting quick replies instead of typing manually, agents/users can respond - **`/quick ai`**: Use AI to generate replies - **`/quick help`**: Get help with Quick Reply - **`/qs `**: Quickly search and send a reply by name +- **`/quick create `**: Create a quick reply directly from the input box with a name and message ### Using Placeholders: diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index 3c07bdd..16846a8 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -65,6 +65,7 @@ export class CommandUtility implements ICommandUtility { triggerId: this.triggerId, threadId: this.threadId, language, + args: this.params, }); switch (this.params.length) { @@ -77,6 +78,11 @@ export class CommandUtility implements ICommandUtility { break; } default: { + const subCommand = this.params[0].toLowerCase(); + if (subCommand === CommandParam.CREATE){ + await this.handleSingleParam(handler) + break; + } await handler.sendDefault(); } } diff --git a/src/definition/handlers/IHandler.ts b/src/definition/handlers/IHandler.ts index d589bf0..3bccae5 100644 --- a/src/definition/handlers/IHandler.ts +++ b/src/definition/handlers/IHandler.ts @@ -10,4 +10,5 @@ export interface IHandler extends Omit { export type IHanderParams = Omit & { language: Language; + args : string[]; }; diff --git a/src/handlers/ExecuteActionButtonHandler.ts b/src/handlers/ExecuteActionButtonHandler.ts index 58fbca6..c418ea3 100644 --- a/src/handlers/ExecuteActionButtonHandler.ts +++ b/src/handlers/ExecuteActionButtonHandler.ts @@ -24,6 +24,7 @@ export class ExecuteActionButtonHandler { protected readonly http: IHttp, protected readonly persistence: IPersistence, protected readonly modify: IModify, + protected readonly params: string[] = [], context: UIKitActionButtonInteractionContext, ) { this.context = context; @@ -56,6 +57,7 @@ export class ExecuteActionButtonHandler { persis: this.persistence, triggerId, language, + args: this.params, }); switch (actionId) { diff --git a/src/handlers/ExecuteBlockActionHandler.ts b/src/handlers/ExecuteBlockActionHandler.ts index 5912997..3d34548 100644 --- a/src/handlers/ExecuteBlockActionHandler.ts +++ b/src/handlers/ExecuteBlockActionHandler.ts @@ -39,6 +39,7 @@ export class ExecuteBlockActionHandler { protected readonly http: IHttp, protected readonly persistence: IPersistence, protected readonly modify: IModify, + protected readonly params: string[] = [], context: UIKitBlockInteractionContext, ) { this.context = context; @@ -102,6 +103,7 @@ export class ExecuteBlockActionHandler { persis: this.persistence, triggerId, language, + args: this.params, }); switch (actionId) { diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index 5f4c0ca..033f452 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -35,6 +35,7 @@ export class Handler implements IHandler { public triggerId?: string; public threadId?: string; public language: Language; + public args? : string[]; constructor(params: IHanderParams) { this.app = params.app; @@ -47,6 +48,8 @@ export class Handler implements IHandler { this.triggerId = params.triggerId; this.threadId = params.threadId; this.language = params.language; + this.args = params.args; + const persistenceRead = params.read.getPersistenceReader(); this.roomInteractionStorage = new RoomInteractionStorage( params.persis, @@ -62,8 +65,10 @@ export class Handler implements IHandler { this.read, this.persis, this.modify, + this.sender, this.room, this.language, + this.args ?? [], ); if (modal instanceof Error) { @@ -71,6 +76,11 @@ export class Handler implements IHandler { return; } + if (!modal) { + this.app.getLogger().error('Modal is undefined. Cannot open surface view.'); + return; + } + const triggerId = this.triggerId; if (triggerId) { diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 7815e98..858f241 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -3,92 +3,123 @@ import { IPersistence, IRead, IUIKitSurfaceViewParam, -} from '@rocket.chat/apps-engine/definition/accessors'; -import { TextObjectType, InputBlock } from '@rocket.chat/ui-kit'; - -import { QuickRepliesApp } from '../../QuickRepliesApp'; -import { IUser } from '@rocket.chat/apps-engine/definition/users'; -import { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; -import { inputElementComponent } from './common/inputElementComponent'; -import { + } from '@rocket.chat/apps-engine/definition/accessors'; + import { TextObjectType, InputBlock } from '@rocket.chat/ui-kit'; + + import { QuickRepliesApp } from '../../QuickRepliesApp'; + import { IUser } from '@rocket.chat/apps-engine/definition/users'; + import { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; + import { inputElementComponent } from './common/inputElementComponent'; + import { ButtonStyle, UIKitSurfaceType, -} from '@rocket.chat/apps-engine/definition/uikit'; -import { CreateModalEnum } from '../enum/modals/createModal'; -import { Language, t } from '../lib/Translation/translation'; - -export async function CreateReplyModal( + } from '@rocket.chat/apps-engine/definition/uikit'; + import { CreateModalEnum } from '../enum/modals/createModal'; + import { Language, t } from '../lib/Translation/translation'; + import { ReplyStorage } from '../storage/ReplyStorage'; + import { sendNotification } from '../helper/notification'; + + export async function CreateReplyModal( app: QuickRepliesApp, user: IUser, read: IRead, persistence: IPersistence, modify: IModify, + sender: IUser, room: IRoom, language: Language, -): Promise { + args: string[], + ): Promise { + if (args.length > 1) { + const replyName = args[1]; + const replyBody = args.slice(2).join(' '); + + const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); + + const result = await replyStorage.createReply(sender, replyName, replyBody, language); + + if (!result.success) { + const errorMessage = `${t('Fail_Create_Reply', language, { + name: sender.name, + })} \n\n ${result.error}`; + await sendNotification(read, modify, sender, room, { message: errorMessage }); + return; + } + + const successMessage = `${t('Success_Create_Reply', language, { + name: sender.name, + replyname: replyName, + })}`; + await sendNotification(read, modify, sender, room, { message: successMessage }); + return; + + + } + const { elementBuilder, blockBuilder } = app.getUtils(); - + const blocks: InputBlock[] = []; - + const labelReplyName = t('Reply_Name_Label', language); const placeholderReplyName = t('Reply_Name_Placeholder', language); - + const inputReplyName = inputElementComponent( - { - app, - placeholder: placeholderReplyName, - label: labelReplyName, - optional: false, - }, - { - blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, - actionId: CreateModalEnum.REPLY_NAME_ACTION_ID, - }, + { + app, + placeholder: placeholderReplyName, + label: labelReplyName, + optional: false, + }, + { + blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, + actionId: CreateModalEnum.REPLY_NAME_ACTION_ID, + }, ); - + const labelReplyBody = t('Reply_Body_Label', language); const placeholderReplyBody = t('Reply_Body_Placeholder', language); - + const inputReplyBody = inputElementComponent( - { - app, - placeholder: placeholderReplyBody, - label: labelReplyBody, - optional: false, - multiline: true, - }, - { - blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, - actionId: CreateModalEnum.REPLY_BODY_ACTION_ID, - }, + { + app, + placeholder: placeholderReplyBody, + label: labelReplyBody, + optional: false, + multiline: true, + }, + { + blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, + actionId: CreateModalEnum.REPLY_BODY_ACTION_ID, + }, ); - + blocks.push(inputReplyName, inputReplyBody); - + const submit = elementBuilder.addButton( - { text: t('Create_Button', language), style: ButtonStyle.PRIMARY }, - { - actionId: CreateModalEnum.SUBMIT_ACTION_ID, - blockId: CreateModalEnum.SUBMIT_BLOCK_ID, - }, + { text: t('Create_Button', language), style: ButtonStyle.PRIMARY }, + { + actionId: CreateModalEnum.SUBMIT_ACTION_ID, + blockId: CreateModalEnum.SUBMIT_BLOCK_ID, + }, ); - + const close = elementBuilder.addButton( - { text: t('Close_Button', language), style: ButtonStyle.DANGER }, - { - actionId: CreateModalEnum.CLOSE_ACTION_ID, - blockId: CreateModalEnum.CLOSE_BLOCK_ID, - }, + { text: t('Close_Button', language), style: ButtonStyle.DANGER }, + { + actionId: CreateModalEnum.CLOSE_ACTION_ID, + blockId: CreateModalEnum.CLOSE_BLOCK_ID, + }, ); return { - id: `${CreateModalEnum.VIEW_ID}`, - type: UIKitSurfaceType.MODAL, - title: { - type: TextObjectType.MRKDWN, - text: t('Create_Modal_Title', language), - }, - blocks, - close, - submit, + id: `${CreateModalEnum.VIEW_ID}`, + type: UIKitSurfaceType.MODAL, + title: { + type: TextObjectType.MRKDWN, + text: t('Create_Modal_Title', language), + }, + blocks, + close, + submit, }; -} + } + \ No newline at end of file From 1a587805017c3db3aa99b4782ddee5bcefe551f5 Mon Sep 17 00:00:00 2001 From: not-meet Date: Sat, 30 Nov 2024 20:41:25 +0530 Subject: [PATCH 02/16] removed linting commits --- src/modal/createModal.ts | 178 +++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 90 deletions(-) diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 858f241..b43e634 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -3,123 +3,121 @@ import { IPersistence, IRead, IUIKitSurfaceViewParam, - } from '@rocket.chat/apps-engine/definition/accessors'; - import { TextObjectType, InputBlock } from '@rocket.chat/ui-kit'; - - import { QuickRepliesApp } from '../../QuickRepliesApp'; - import { IUser } from '@rocket.chat/apps-engine/definition/users'; - import { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; - import { inputElementComponent } from './common/inputElementComponent'; - import { +} from '@rocket.chat/apps-engine/definition/accessors'; +import { TextObjectType, InputBlock } from '@rocket.chat/ui-kit'; + +import { QuickRepliesApp } from '../../QuickRepliesApp'; +import { IUser } from '@rocket.chat/apps-engine/definition/users'; +import { IRoom } from '@rocket.chat/apps-engine/definition/rooms'; +import { inputElementComponent } from './common/inputElementComponent'; +import { ButtonStyle, UIKitSurfaceType, - } from '@rocket.chat/apps-engine/definition/uikit'; - import { CreateModalEnum } from '../enum/modals/createModal'; - import { Language, t } from '../lib/Translation/translation'; - import { ReplyStorage } from '../storage/ReplyStorage'; - import { sendNotification } from '../helper/notification'; - - export async function CreateReplyModal( +} from '@rocket.chat/apps-engine/definition/uikit'; +import { CreateModalEnum } from '../enum/modals/createModal'; +import { Language, t } from '../lib/Translation/translation'; +import { ReplyStorage } from '../storage/ReplyStorage'; +import { sendNotification } from '../helper/notification'; + +export async function CreateReplyModal( app: QuickRepliesApp, user: IUser, read: IRead, persistence: IPersistence, modify: IModify, - sender: IUser, + sender : IUser, room: IRoom, language: Language, args: string[], - ): Promise { +): Promise { if (args.length > 1) { - const replyName = args[1]; - const replyBody = args.slice(2).join(' '); - - const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); - - const result = await replyStorage.createReply(sender, replyName, replyBody, language); - - if (!result.success) { - const errorMessage = `${t('Fail_Create_Reply', language, { - name: sender.name, - })} \n\n ${result.error}`; - await sendNotification(read, modify, sender, room, { message: errorMessage }); + const replyName = args[1]; // Get the name of the reply + const replyBody = args.slice(2).join(' '); // Get the body of the reply + + const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); // Initialize ReplyStorage + + const result = await replyStorage.createReply(sender, replyName, replyBody, language); // Attempt to create reply + + if (!result.success) { // If creation fails, send failure notification + const errorMessage = `${t('Fail_Create_Reply', language, { + name: sender.name, + })} \n\n ${result.error}`; + await sendNotification(read, modify, sender, room, { message: errorMessage }); + return; + } + + const successMessage = `${t('Success_Create_Reply', language, { + name: sender.name, + replyname: replyName, + })}`; // Success message to notify user + await sendNotification(read, modify, sender, room, { message: successMessage }); return; - } - - const successMessage = `${t('Success_Create_Reply', language, { - name: sender.name, - replyname: replyName, - })}`; - await sendNotification(read, modify, sender, room, { message: successMessage }); - return; - - } - + + const { elementBuilder, blockBuilder } = app.getUtils(); - + const blocks: InputBlock[] = []; - + const labelReplyName = t('Reply_Name_Label', language); const placeholderReplyName = t('Reply_Name_Placeholder', language); - + const inputReplyName = inputElementComponent( - { - app, - placeholder: placeholderReplyName, - label: labelReplyName, - optional: false, - }, - { - blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, - actionId: CreateModalEnum.REPLY_NAME_ACTION_ID, - }, + { + app, + placeholder: placeholderReplyName, + label: labelReplyName, + optional: false, + }, + { + blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, + actionId: CreateModalEnum.REPLY_NAME_ACTION_ID, + }, ); - + const labelReplyBody = t('Reply_Body_Label', language); const placeholderReplyBody = t('Reply_Body_Placeholder', language); - + const inputReplyBody = inputElementComponent( - { - app, - placeholder: placeholderReplyBody, - label: labelReplyBody, - optional: false, - multiline: true, - }, - { - blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, - actionId: CreateModalEnum.REPLY_BODY_ACTION_ID, - }, + { + app, + placeholder: placeholderReplyBody, + label: labelReplyBody, + optional: false, + multiline: true, + }, + { + blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, + actionId: CreateModalEnum.REPLY_BODY_ACTION_ID, + }, ); - + blocks.push(inputReplyName, inputReplyBody); - + const submit = elementBuilder.addButton( - { text: t('Create_Button', language), style: ButtonStyle.PRIMARY }, - { - actionId: CreateModalEnum.SUBMIT_ACTION_ID, - blockId: CreateModalEnum.SUBMIT_BLOCK_ID, - }, + { text: t('Create_Button', language), style: ButtonStyle.PRIMARY }, + { + actionId: CreateModalEnum.SUBMIT_ACTION_ID, + blockId: CreateModalEnum.SUBMIT_BLOCK_ID, + }, ); - + const close = elementBuilder.addButton( - { text: t('Close_Button', language), style: ButtonStyle.DANGER }, - { - actionId: CreateModalEnum.CLOSE_ACTION_ID, - blockId: CreateModalEnum.CLOSE_BLOCK_ID, - }, + { text: t('Close_Button', language), style: ButtonStyle.DANGER }, + { + actionId: CreateModalEnum.CLOSE_ACTION_ID, + blockId: CreateModalEnum.CLOSE_BLOCK_ID, + }, ); return { - id: `${CreateModalEnum.VIEW_ID}`, - type: UIKitSurfaceType.MODAL, - title: { - type: TextObjectType.MRKDWN, - text: t('Create_Modal_Title', language), - }, - blocks, - close, - submit, + id: `${CreateModalEnum.VIEW_ID}`, + type: UIKitSurfaceType.MODAL, + title: { + type: TextObjectType.MRKDWN, + text: t('Create_Modal_Title', language), + }, + blocks, + close, + submit, }; - } - \ No newline at end of file +} \ No newline at end of file From cca74eb48c8cd366387dfd359741e3f557e94cc4 Mon Sep 17 00:00:00 2001 From: not-meet Date: Sat, 30 Nov 2024 20:43:14 +0530 Subject: [PATCH 03/16] removed comments --- src/modal/createModal.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index b43e634..612cece 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -31,14 +31,14 @@ export async function CreateReplyModal( args: string[], ): Promise { if (args.length > 1) { - const replyName = args[1]; // Get the name of the reply - const replyBody = args.slice(2).join(' '); // Get the body of the reply + const replyName = args[1]; + const replyBody = args.slice(2).join(' '); - const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); // Initialize ReplyStorage + const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); - const result = await replyStorage.createReply(sender, replyName, replyBody, language); // Attempt to create reply + const result = await replyStorage.createReply(sender, replyName, replyBody, language); - if (!result.success) { // If creation fails, send failure notification + if (!result.success) { const errorMessage = `${t('Fail_Create_Reply', language, { name: sender.name, })} \n\n ${result.error}`; @@ -49,7 +49,7 @@ export async function CreateReplyModal( const successMessage = `${t('Success_Create_Reply', language, { name: sender.name, replyname: replyName, - })}`; // Success message to notify user + })}`; await sendNotification(read, modify, sender, room, { message: successMessage }); return; } From c4ec6ccef7188dc77105c4ab671fbec163ec915c Mon Sep 17 00:00:00 2001 From: not-meet Date: Wed, 12 Feb 2025 21:45:57 +0530 Subject: [PATCH 04/16] refactored quick create pr code removed unused params --- QuickRepliesApp.ts | 3 --- src/commands/CommandUtility.ts | 15 ++++++++------ src/definition/handlers/IHandler.ts | 2 +- src/handlers/ExecuteActionButtonHandler.ts | 2 -- src/handlers/ExecuteBlockActionHandler.ts | 2 -- src/handlers/Handler.ts | 1 - src/modal/createModal.ts | 24 +++++++++------------- 7 files changed, 20 insertions(+), 29 deletions(-) diff --git a/QuickRepliesApp.ts b/QuickRepliesApp.ts index 8eab81b..48a0d53 100644 --- a/QuickRepliesApp.ts +++ b/QuickRepliesApp.ts @@ -36,7 +36,6 @@ import { settings } from './src/config/settings'; export class QuickRepliesApp extends App { private elementBuilder: ElementBuilder; private blockBuilder: BlockBuilder; - public params: Array; constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) { super(info, logger, accessors); } @@ -142,7 +141,6 @@ export class QuickRepliesApp extends App { http, persistence, modify, - this.params, context, ); @@ -162,7 +160,6 @@ export class QuickRepliesApp extends App { http, persistence, modify, - this.params, context, ); diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index 16846a8..6f5d539 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -68,6 +68,14 @@ export class CommandUtility implements ICommandUtility { args: this.params, }); + if(this.params.length && this.params.length > 2){ + const subCommand = this.params[0].toLowerCase(); + if(subCommand === CommandParam.CREATE){ + await this.handleSingleParam(handler) + return; + } + } + switch (this.params.length) { case 0: { await handler.sendDefault(); @@ -77,12 +85,7 @@ export class CommandUtility implements ICommandUtility { await this.handleSingleParam(handler); break; } - default: { - const subCommand = this.params[0].toLowerCase(); - if (subCommand === CommandParam.CREATE){ - await this.handleSingleParam(handler) - break; - } + default: { await handler.sendDefault(); } } diff --git a/src/definition/handlers/IHandler.ts b/src/definition/handlers/IHandler.ts index 3bccae5..a668025 100644 --- a/src/definition/handlers/IHandler.ts +++ b/src/definition/handlers/IHandler.ts @@ -10,5 +10,5 @@ export interface IHandler extends Omit { export type IHanderParams = Omit & { language: Language; - args : string[]; + args? : string[]; }; diff --git a/src/handlers/ExecuteActionButtonHandler.ts b/src/handlers/ExecuteActionButtonHandler.ts index c418ea3..58fbca6 100644 --- a/src/handlers/ExecuteActionButtonHandler.ts +++ b/src/handlers/ExecuteActionButtonHandler.ts @@ -24,7 +24,6 @@ export class ExecuteActionButtonHandler { protected readonly http: IHttp, protected readonly persistence: IPersistence, protected readonly modify: IModify, - protected readonly params: string[] = [], context: UIKitActionButtonInteractionContext, ) { this.context = context; @@ -57,7 +56,6 @@ export class ExecuteActionButtonHandler { persis: this.persistence, triggerId, language, - args: this.params, }); switch (actionId) { diff --git a/src/handlers/ExecuteBlockActionHandler.ts b/src/handlers/ExecuteBlockActionHandler.ts index 3d34548..5912997 100644 --- a/src/handlers/ExecuteBlockActionHandler.ts +++ b/src/handlers/ExecuteBlockActionHandler.ts @@ -39,7 +39,6 @@ export class ExecuteBlockActionHandler { protected readonly http: IHttp, protected readonly persistence: IPersistence, protected readonly modify: IModify, - protected readonly params: string[] = [], context: UIKitBlockInteractionContext, ) { this.context = context; @@ -103,7 +102,6 @@ export class ExecuteBlockActionHandler { persis: this.persistence, triggerId, language, - args: this.params, }); switch (actionId) { diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index 033f452..afd7803 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -65,7 +65,6 @@ export class Handler implements IHandler { this.read, this.persis, this.modify, - this.sender, this.room, this.language, this.args ?? [], diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 612cece..72b186f 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -25,7 +25,6 @@ export async function CreateReplyModal( read: IRead, persistence: IPersistence, modify: IModify, - sender : IUser, room: IRoom, language: Language, args: string[], @@ -36,21 +35,18 @@ export async function CreateReplyModal( const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); - const result = await replyStorage.createReply(sender, replyName, replyBody, language); + const result = await replyStorage.createReply(user, replyName, replyBody, language); - if (!result.success) { - const errorMessage = `${t('Fail_Create_Reply', language, { - name: sender.name, + const message = result.success + ? t('Success_Create_Reply', language, { + name: user.name, + replyname: replyName, + }) + : `${t('Fail_Create_Reply', language, { + name: user.name, })} \n\n ${result.error}`; - await sendNotification(read, modify, sender, room, { message: errorMessage }); - return; - } - - const successMessage = `${t('Success_Create_Reply', language, { - name: sender.name, - replyname: replyName, - })}`; - await sendNotification(read, modify, sender, room, { message: successMessage }); + + await sendNotification(read, modify, user, room, { message }); return; } From d8ce98297171a0334e7348c5d64d563e1eaebf43 Mon Sep 17 00:00:00 2001 From: not-meet Date: Wed, 12 Feb 2025 22:03:54 +0530 Subject: [PATCH 05/16] added a quick create command exampe and tweaked utility logic --- README.md | 6 ++++++ src/commands/CommandUtility.ts | 2 +- src/modal/createModal.ts | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a5a8cc..f0a32b2 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,12 @@ By selecting quick replies instead of typing manually, agents/users can respond - **`/qs `**: Quickly search and send a reply by name - **`/quick create `**: Create a quick reply directly from the input box with a name and message +#### Example: +```sh +/quick create greeting Hello! How have you been? +``` +This will create a quick reply named **`greeting`**, which can be used later by typing **`/qs greeting`** + ### Using Placeholders: When creating or configuring a reply, you can use placeholders like `[name]`, `[username]`, and `[email]` in the reply content. These placeholders will automatically be replaced based on the recipient's information when the message is sent. diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index 6f5d539..8da433d 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -68,7 +68,7 @@ export class CommandUtility implements ICommandUtility { args: this.params, }); - if(this.params.length && this.params.length > 2){ + if(this.params.length && this.params.length > 1){ const subCommand = this.params[0].toLowerCase(); if(subCommand === CommandParam.CREATE){ await this.handleSingleParam(handler) diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 72b186f..21a67e9 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -50,7 +50,6 @@ export async function CreateReplyModal( return; } - const { elementBuilder, blockBuilder } = app.getUtils(); const blocks: InputBlock[] = []; From bf658dee66543e513201297ff770c00016f93dcd Mon Sep 17 00:00:00 2001 From: not-meet Date: Sun, 23 Feb 2025 02:09:50 +0530 Subject: [PATCH 06/16] added final changes --- src/handlers/ExecuteViewSubmitHandler.ts | 14 +++++------- src/handlers/Handler.ts | 12 ++++------ src/modal/createModal.ts | 29 +++++------------------- 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/src/handlers/ExecuteViewSubmitHandler.ts b/src/handlers/ExecuteViewSubmitHandler.ts index 53334e5..fa67526 100644 --- a/src/handlers/ExecuteViewSubmitHandler.ts +++ b/src/handlers/ExecuteViewSubmitHandler.ts @@ -119,14 +119,12 @@ export class ExecuteViewSubmitHandler { language: Language, triggerId: string, ): Promise { - const nameStateValue = - view.state?.[CreateModalEnum.REPLY_NAME_BLOCK_ID]?.[ - CreateModalEnum.REPLY_NAME_ACTION_ID - ]; - const bodyStateValue = - view.state?.[CreateModalEnum.REPLY_BODY_BLOCK_ID]?.[ - CreateModalEnum.REPLY_BODY_ACTION_ID - ]; + const nameStateValue = view.state && Object.values(view.state) + .find(obj => 'reply-name-action-id' in obj) + ?.['reply-name-action-id']; + const bodyStateValue = view.state && Object.values(view.state) + .find(obj => 'reply-body-action-id' in obj) + ?.['reply-body-action-id']; const name = nameStateValue ? nameStateValue.trim() : ''; const body = bodyStateValue ? bodyStateValue.trim() : ''; diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index afd7803..510b8d7 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -59,6 +59,8 @@ export class Handler implements IHandler { } public async CreateReply(): Promise { + const cliName = this.args?.[1] || ''; + const cliBody = this.args?.slice(2).join(' ') || ''; const modal = await CreateReplyModal( this.app, this.sender, @@ -67,19 +69,15 @@ export class Handler implements IHandler { this.modify, this.room, this.language, - this.args ?? [], + cliName, + cliBody, ); if (modal instanceof Error) { this.app.getLogger().error(modal.message); return; } - - if (!modal) { - this.app.getLogger().error('Modal is undefined. Cannot open surface view.'); - return; - } - + const triggerId = this.triggerId; if (triggerId) { diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 21a67e9..1493b12 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -27,29 +27,10 @@ export async function CreateReplyModal( modify: IModify, room: IRoom, language: Language, - args: string[], -): Promise { - if (args.length > 1) { - const replyName = args[1]; - const replyBody = args.slice(2).join(' '); - - const replyStorage = new ReplyStorage(persistence, read.getPersistenceReader()); - - const result = await replyStorage.createReply(user, replyName, replyBody, language); - - const message = result.success - ? t('Success_Create_Reply', language, { - name: user.name, - replyname: replyName, - }) - : `${t('Fail_Create_Reply', language, { - name: user.name, - })} \n\n ${result.error}`; - - await sendNotification(read, modify, user, room, { message }); - return; - } - + cliName: string, + cliBody: string, +): Promise { + const { elementBuilder, blockBuilder } = app.getUtils(); const blocks: InputBlock[] = []; @@ -63,6 +44,7 @@ export async function CreateReplyModal( placeholder: placeholderReplyName, label: labelReplyName, optional: false, + initialValue: cliName, }, { blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, @@ -80,6 +62,7 @@ export async function CreateReplyModal( label: labelReplyBody, optional: false, multiline: true, + initialValue: cliBody, }, { blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, From 69818f252a5639d31f52ab0f4c54ee24eea4811a Mon Sep 17 00:00:00 2001 From: not-meet Date: Sun, 23 Feb 2025 02:16:11 +0530 Subject: [PATCH 07/16] removed spaces and unused imports --- src/commands/CommandUtility.ts | 2 +- src/modal/createModal.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index 8da433d..ead7513 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -85,7 +85,7 @@ export class CommandUtility implements ICommandUtility { await this.handleSingleParam(handler); break; } - default: { + default: { await handler.sendDefault(); } } diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 1493b12..e65a117 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -16,8 +16,6 @@ import { } from '@rocket.chat/apps-engine/definition/uikit'; import { CreateModalEnum } from '../enum/modals/createModal'; import { Language, t } from '../lib/Translation/translation'; -import { ReplyStorage } from '../storage/ReplyStorage'; -import { sendNotification } from '../helper/notification'; export async function CreateReplyModal( app: QuickRepliesApp, From a275aeab9f948088ef987487512a86f157258be9 Mon Sep 17 00:00:00 2001 From: not-meet Date: Mon, 24 Feb 2025 04:26:22 +0530 Subject: [PATCH 08/16] completed requested changes --- src/commands/CommandUtility.ts | 2 +- src/handlers/ExecuteViewSubmitHandler.ts | 14 ++++++++------ src/handlers/Handler.ts | 8 ++++---- src/modal/common/inputElementComponent.ts | 2 ++ src/modal/createModal.ts | 8 ++++---- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index ead7513..2353dc6 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -85,7 +85,7 @@ export class CommandUtility implements ICommandUtility { await this.handleSingleParam(handler); break; } - default: { + default: { await handler.sendDefault(); } } diff --git a/src/handlers/ExecuteViewSubmitHandler.ts b/src/handlers/ExecuteViewSubmitHandler.ts index fa67526..53334e5 100644 --- a/src/handlers/ExecuteViewSubmitHandler.ts +++ b/src/handlers/ExecuteViewSubmitHandler.ts @@ -119,12 +119,14 @@ export class ExecuteViewSubmitHandler { language: Language, triggerId: string, ): Promise { - const nameStateValue = view.state && Object.values(view.state) - .find(obj => 'reply-name-action-id' in obj) - ?.['reply-name-action-id']; - const bodyStateValue = view.state && Object.values(view.state) - .find(obj => 'reply-body-action-id' in obj) - ?.['reply-body-action-id']; + const nameStateValue = + view.state?.[CreateModalEnum.REPLY_NAME_BLOCK_ID]?.[ + CreateModalEnum.REPLY_NAME_ACTION_ID + ]; + const bodyStateValue = + view.state?.[CreateModalEnum.REPLY_BODY_BLOCK_ID]?.[ + CreateModalEnum.REPLY_BODY_ACTION_ID + ]; const name = nameStateValue ? nameStateValue.trim() : ''; const body = bodyStateValue ? bodyStateValue.trim() : ''; diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index 510b8d7..c321c44 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -59,8 +59,8 @@ export class Handler implements IHandler { } public async CreateReply(): Promise { - const cliName = this.args?.[1] || ''; - const cliBody = this.args?.slice(2).join(' ') || ''; + const initialReplyName = this.args?.[1] || ''; + const initialReplyBody = this.args?.slice(2).join(' ') || ''; const modal = await CreateReplyModal( this.app, this.sender, @@ -69,8 +69,8 @@ export class Handler implements IHandler { this.modify, this.room, this.language, - cliName, - cliBody, + initialReplyName, + initialReplyBody, ); if (modal instanceof Error) { diff --git a/src/modal/common/inputElementComponent.ts b/src/modal/common/inputElementComponent.ts index b95937d..bdebd3b 100644 --- a/src/modal/common/inputElementComponent.ts +++ b/src/modal/common/inputElementComponent.ts @@ -2,6 +2,7 @@ import { InputBlock, InputElementDispatchAction } from '@rocket.chat/ui-kit'; import { QuickRepliesApp } from '../../../QuickRepliesApp'; import { ElementInteractionParam } from '../../definition/ui-kit/Element/IElementBuilder'; import { Modals } from '../../enum/modals/common/Modal'; + export function inputElementComponent( { app, @@ -50,6 +51,7 @@ export function inputElementComponent( text: label, element: plainTextInputElement, optional, + blockId, }); return plainTextInputBlock; diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index e65a117..717a670 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -25,8 +25,8 @@ export async function CreateReplyModal( modify: IModify, room: IRoom, language: Language, - cliName: string, - cliBody: string, + initialReplyName: string, + initialReplyBody: string, ): Promise { const { elementBuilder, blockBuilder } = app.getUtils(); @@ -42,7 +42,7 @@ export async function CreateReplyModal( placeholder: placeholderReplyName, label: labelReplyName, optional: false, - initialValue: cliName, + initialValue: initialReplyName, }, { blockId: CreateModalEnum.REPLY_NAME_BLOCK_ID, @@ -60,7 +60,7 @@ export async function CreateReplyModal( label: labelReplyBody, optional: false, multiline: true, - initialValue: cliBody, + initialValue: initialReplyBody, }, { blockId: CreateModalEnum.REPLY_BODY_BLOCK_ID, From aed58986818fd88f63e4fa472c19485eb3e7db1a Mon Sep 17 00:00:00 2001 From: not-meet Date: Mon, 24 Feb 2025 04:33:40 +0530 Subject: [PATCH 09/16] removed spaces --- src/handlers/Handler.ts | 1 - src/modal/common/inputElementComponent.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index c321c44..b8bb63e 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -77,7 +77,6 @@ export class Handler implements IHandler { this.app.getLogger().error(modal.message); return; } - const triggerId = this.triggerId; if (triggerId) { diff --git a/src/modal/common/inputElementComponent.ts b/src/modal/common/inputElementComponent.ts index bdebd3b..92cb0c0 100644 --- a/src/modal/common/inputElementComponent.ts +++ b/src/modal/common/inputElementComponent.ts @@ -2,7 +2,6 @@ import { InputBlock, InputElementDispatchAction } from '@rocket.chat/ui-kit'; import { QuickRepliesApp } from '../../../QuickRepliesApp'; import { ElementInteractionParam } from '../../definition/ui-kit/Element/IElementBuilder'; import { Modals } from '../../enum/modals/common/Modal'; - export function inputElementComponent( { app, From 1c9b80221c51e81254b8595219fba9e56184b3c8 Mon Sep 17 00:00:00 2001 From: not-meet Date: Thu, 27 Feb 2025 01:36:11 +0530 Subject: [PATCH 10/16] renamed the args changes made as requested --- README.md | 6 +++--- src/commands/CommandUtility.ts | 2 +- src/definition/handlers/IHandler.ts | 2 +- src/handlers/Handler.ts | 8 ++++---- src/modal/createModal.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 80ccd24..a88c569 100644 --- a/README.md +++ b/README.md @@ -83,13 +83,13 @@ By selecting quick replies instead of typing manually, agents/users can respond - **`/quick ai`**: Use AI to generate replies - **`/quick help`**: Get help with Quick Reply - **`/qs `**: Quickly search and send a reply by name -- **`/quick create `**: Create a quick reply directly from the input box with a name and message +- **`/quick create "" `**: Create a quick reply directly from the input box with a name and message #### Example: ```sh -/quick create greeting Hello! How have you been? +/quick create "greeting" Hello! How have you been? ``` -This will create a quick reply named **`greeting`**, which can be used later by typing **`/qs greeting`** +This will add the reply name as **`greeting`** and the rest message as body in the modal, which can be used later by typing **`/qs greeting`** ### Using Placeholders: diff --git a/src/commands/CommandUtility.ts b/src/commands/CommandUtility.ts index 2353dc6..be582c2 100644 --- a/src/commands/CommandUtility.ts +++ b/src/commands/CommandUtility.ts @@ -65,7 +65,7 @@ export class CommandUtility implements ICommandUtility { triggerId: this.triggerId, threadId: this.threadId, language, - args: this.params, + params: this.params, }); if(this.params.length && this.params.length > 1){ diff --git a/src/definition/handlers/IHandler.ts b/src/definition/handlers/IHandler.ts index a668025..93ab321 100644 --- a/src/definition/handlers/IHandler.ts +++ b/src/definition/handlers/IHandler.ts @@ -10,5 +10,5 @@ export interface IHandler extends Omit { export type IHanderParams = Omit & { language: Language; - args? : string[]; + params?: string[]; }; diff --git a/src/handlers/Handler.ts b/src/handlers/Handler.ts index b8bb63e..d710edf 100644 --- a/src/handlers/Handler.ts +++ b/src/handlers/Handler.ts @@ -35,7 +35,7 @@ export class Handler implements IHandler { public triggerId?: string; public threadId?: string; public language: Language; - public args? : string[]; + public params?: string[]; constructor(params: IHanderParams) { this.app = params.app; @@ -48,7 +48,7 @@ export class Handler implements IHandler { this.triggerId = params.triggerId; this.threadId = params.threadId; this.language = params.language; - this.args = params.args; + this.params = params.params; const persistenceRead = params.read.getPersistenceReader(); this.roomInteractionStorage = new RoomInteractionStorage( @@ -59,8 +59,8 @@ export class Handler implements IHandler { } public async CreateReply(): Promise { - const initialReplyName = this.args?.[1] || ''; - const initialReplyBody = this.args?.slice(2).join(' ') || ''; + const initialReplyName = this.params?.[1]; + const initialReplyBody = this.params?.slice(2).join(' '); const modal = await CreateReplyModal( this.app, this.sender, diff --git a/src/modal/createModal.ts b/src/modal/createModal.ts index 717a670..53f8546 100644 --- a/src/modal/createModal.ts +++ b/src/modal/createModal.ts @@ -25,8 +25,8 @@ export async function CreateReplyModal( modify: IModify, room: IRoom, language: Language, - initialReplyName: string, - initialReplyBody: string, + initialReplyName?: string, + initialReplyBody?: string, ): Promise { const { elementBuilder, blockBuilder } = app.getUtils(); From b4e19a85668ec3b38af0b9be350c41d12841ed18 Mon Sep 17 00:00:00 2001 From: not-meet Date: Thu, 27 Feb 2025 06:13:26 +0530 Subject: [PATCH 11/16] made changes in readme file --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac3782d..9c854b3 100644 --- a/README.md +++ b/README.md @@ -86,18 +86,37 @@ By selecting quick replies instead of typing manually, agents/users can respond - **`/quick`**: Get started with Quick Reply - **`/quick create`**: Create a new quick reply +- **`/quick create "" `**: Create a quick reply directly from the message box with a name and message - **`/quick list`**: List all your quick replies - **`/quick config`**: Configure your language preferences and AI settings - **`/quick ai`**: Use AI to generate replies - **`/quick help`**: Get help with Quick Reply - **`/qs `**: Quickly search and send a reply by name -- **`/quick create "" `**: Create a quick reply directly from the input box with a name and message -#### Example: + +#### Creating Quick Replies from Message Box +**`/quick create "" `**: Create a quick reply using the message box + +When you use this command: +1. A modal window opens automatically +2. The name and replybody field is prefilled with your specified values +3. Simply review and click the Submit button to save your quick reply + +The command works as follows: +- The name must be enclosed in quotes `"..."` if it contains multiple words +- Everything after the name is treated as the message body +- Without quotes, only the first word would be taken as the name + +#### Examples: ```sh -/quick create "greeting" Hello! How have you been? +# Single word name (quotes optional) +/quick create greeting Hello! How have you been? + +# Multi-word name (quotes required) +/quick create "welcome message" Welcome to our channel! How can I help you? ``` -This will add the reply name as **`greeting`** and the rest message as body in the modal, which can be used later by typing **`/qs greeting`** + +Both examples will open a modal with the name and message already filled in. Just click Submit to save your quick reply, which can then be used with **`/qs `**. ### Using Placeholders: From a42ce1c47bbb6570bd0768b1716a62871071c1df Mon Sep 17 00:00:00 2001 From: not-meet Date: Fri, 28 Feb 2025 04:21:50 +0530 Subject: [PATCH 12/16] changes in readme --- README.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 9c854b3..0221cac 100644 --- a/README.md +++ b/README.md @@ -95,28 +95,10 @@ By selecting quick replies instead of typing manually, agents/users can respond #### Creating Quick Replies from Message Box -**`/quick create "" `**: Create a quick reply using the message box +**`/quick create "" `**: "you can use double quotes to write the name with spaces" and write everything else as a body! +

or

+**`/quick create `**: You can write name without using double quotes if the name do not have spaces! -When you use this command: -1. A modal window opens automatically -2. The name and replybody field is prefilled with your specified values -3. Simply review and click the Submit button to save your quick reply - -The command works as follows: -- The name must be enclosed in quotes `"..."` if it contains multiple words -- Everything after the name is treated as the message body -- Without quotes, only the first word would be taken as the name - -#### Examples: -```sh -# Single word name (quotes optional) -/quick create greeting Hello! How have you been? - -# Multi-word name (quotes required) -/quick create "welcome message" Welcome to our channel! How can I help you? -``` - -Both examples will open a modal with the name and message already filled in. Just click Submit to save your quick reply, which can then be used with **`/qs `**. ### Using Placeholders: From f28fd6ef1f6c666cec3745c57ef3d072f71523bc Mon Sep 17 00:00:00 2001 From: not-meet Date: Fri, 28 Feb 2025 04:32:18 +0530 Subject: [PATCH 13/16] changes in readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0221cac..cc0008c 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,15 @@ By selecting quick replies instead of typing manually, agents/users can respond #### Creating Quick Replies from Message Box **`/quick create "" `**: "you can use double quotes to write the name with spaces" and write everything else as a body! -

or

-**`/quick create `**: You can write name without using double quotes if the name do not have spaces! +Example: `/quick create "need assistance" Hey! can you guide me a bit i am facing some issues!` +

or

+ +**`/quick create `**: You can write name without using double quotes if the name doesn't have spaces! +Example: `/quick create greeting Hey there! Welcome to our channel 👋` ### Using Placeholders: +``` When creating or configuring a reply, you can use placeholders like `[name]`, `[username]`, and `[email]` in the reply content. These placeholders will automatically be replaced based on the recipient's information when the message is sent. From ca43cde3f2e209c7339238f81f8c3335fa8c1c9f Mon Sep 17 00:00:00 2001 From: not-meet Date: Fri, 28 Feb 2025 04:44:48 +0530 Subject: [PATCH 14/16] changes in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cc0008c..cba4655 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,13 @@ By selecting quick replies instead of typing manually, agents/users can respond #### Creating Quick Replies from Message Box **`/quick create "" `**: "you can use double quotes to write the name with spaces" and write everything else as a body! + Example: `/quick create "need assistance" Hey! can you guide me a bit i am facing some issues!`

or

**`/quick create `**: You can write name without using double quotes if the name doesn't have spaces! + Example: `/quick create greeting Hey there! Welcome to our channel 👋` ### Using Placeholders: From 8f85896ff563dd48dbb2f2f1f1f404ebee249bd4 Mon Sep 17 00:00:00 2001 From: not-meet Date: Fri, 28 Feb 2025 20:55:50 +0530 Subject: [PATCH 15/16] changes in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cba4655..66d3f6b 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,9 @@ By selecting quick replies instead of typing manually, agents/users can respond #### Creating Quick Replies from Message Box -**`/quick create "" `**: "you can use double quotes to write the name with spaces" and write everything else as a body! +**`/quick create "" `**: "if your name has multiple words with space, use double quotes" and write everything else as a body! -Example: `/quick create "need assistance" Hey! can you guide me a bit i am facing some issues!` +Example: `/quick create "schedule meeting" let's have a quick meet in an hour!`

or

From 22cd3c6e56c4635e75eca145291a9a0950765f12 Mon Sep 17 00:00:00 2001 From: not-meet Date: Wed, 5 Mar 2025 02:55:06 +0530 Subject: [PATCH 16/16] tweaked readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 66d3f6b..d783e21 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,6 @@ Example: `/quick create "schedule meeting" let's have a quick meet in an hour!` Example: `/quick create greeting Hey there! Welcome to our channel 👋` ### Using Placeholders: -``` - When creating or configuring a reply, you can use placeholders like `[name]`, `[username]`, and `[email]` in the reply content. These placeholders will automatically be replaced based on the recipient's information when the message is sent.