Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/handlers/Handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { IReply } from '../definition/reply/IReply';
import {
sendDefaultNotification,
sendHelperNotification,
sendNotification,
} from '../helper/notification';
import { UserPreferenceModal } from '../modal/UserPreferenceModal';
import { Language } from '../lib/Translation/translation';
Expand Down Expand Up @@ -205,5 +206,19 @@ export class Handler implements IHandler {
}
return;
}
else if(lastMessage?.attachments && !lastMessage?.attachments?.[0]?.description){
const content = {
message: "Quick replies can't be used because the attachment has no description. The attachment must have a description to proceed."
}
await sendNotification(this.read, this.modify, this.sender, this.room, content);
return
}
else{
const content = {
message: "Quick replies can't be used because there is no message to reply to. Please try again with a valid message."
}
await sendNotification(this.read, this.modify, this.sender, this.room, content);
return
}
}
}