Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
17 changes: 16 additions & 1 deletion src/handlers/Handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import { IReply } from '../definition/reply/IReply';
import {
sendDefaultNotification,
sendHelperNotification,
sendNotification,
} from '../helper/notification';
import { UserPreferenceModal } from '../modal/UserPreferenceModal';
import { Language } from '../lib/Translation/translation';
import { Language, t } from '../lib/Translation/translation';
import { ReplyAIModal } from '../modal/AIreplyModal';
import { AIstorage } from '../storage/AIStorage';
import { UserPreferenceStorage } from '../storage/userPreferenceStorage';
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: t('Error_Missing_Attachment_Description', this.language)
}
await sendNotification(this.read, this.modify, this.sender, this.room, content);
return
}
else{
const content = {
message: t('Error_Missing_Message', this.language)
}
await sendNotification(this.read, this.modify, this.sender, this.room, content);
return
}
}
}
5 changes: 3 additions & 2 deletions src/lib/Translation/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const de = {
AI_Gemini_Model_Not_Configured: "Ihr Gemini-Modell ist nicht richtig eingerichtet. Bitte überprüfen Sie Ihre Konfiguration",
AI_Workspace_Model_Not_Configured: "Ihre Workspace-AI ist nicht richtig eingerichtet. Bitte kontaktieren Sie Ihren Administrator",
AI_Something_Went_Wrong: "Etwas ist schiefgelaufen. Bitte versuchen Sie es später noch einmal.",
Refresh_Button_Text: "Aktualisieren"

Refresh_Button_Text: "Aktualisieren",
Error_Missing_Attachment_Description: "Schnelle Antwort können nicht verwendet werden, da der Anhang keine Beschreibung enthält. Der Anhang muss eine Beschreibung haben, um fortzufahren.",
Error_Missing_Message: "Schnelle Antwort können nicht verwendet werden, da keine Nachricht zum Antworten vorhanden ist. Bitte versuchen Sie es mit einer gültigen Nachricht erneut."
}
5 changes: 4 additions & 1 deletion src/lib/Translation/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ export const en = {
AI_Gemini_Model_Not_Configured: "Your Gemini Model is not set up properly. Please check your configuration",
AI_Workspace_Model_Not_Configured: "Your Workspace AI is not set up properly. Please contact your administrator",
AI_Something_Went_Wrong: "Something went wrong. Please try again later.",
Refresh_Button_Text: "Refresh"};
Refresh_Button_Text: "Refresh",
Error_Missing_Attachment_Description: "Quick replies can't be used because the attachment has no description. The attachment must have a description to proceed.",
Error_Missing_Message: "Quick replies can't be used because there is no message to reply to. Please try again with a valid message."
};
5 changes: 3 additions & 2 deletions src/lib/Translation/locales/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export const pl = {
AI_Gemini_Model_Not_Configured: "Twój model Gemini nie jest poprawnie skonfigurowany. Proszę sprawdzić swoją konfigurację",
AI_Workspace_Model_Not_Configured: "Twoja AI w Workspace nie jest poprawnie skonfigurowana. Proszę skontaktować się z administratorem",
AI_Something_Went_Wrong: "Coś poszło nie tak. Proszę spróbować ponownie później.",
Refresh_Button_Text: "Odśwież"

Refresh_Button_Text: "Odśwież",
Error_Missing_Attachment_Description: "Nie można użyć szybkich odpowiedzi, ponieważ załącznik nie ma opisu. Załącznik musi zawierać opis, aby kontynuować.",
Error_Missing_Message: "Nie można użyć szybka odpowiedź, ponieważ nie ma wiadomości, na którą można odpowiedzieć. Spróbuj ponownie z prawidłową wiadomością."
}

5 changes: 3 additions & 2 deletions src/lib/Translation/locales/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export const pt = {
AI_Gemini_Model_Not_Configured: "Seu Modelo Gemini não está configurado corretamente. Por favor, verifique sua configuração",
AI_Workspace_Model_Not_Configured: "Sua IA do Workspace não está configurada corretamente. Por favor, entre em contato com o administrador",
AI_Something_Went_Wrong: "Algo deu errado. Por favor, tente novamente mais tarde.",
Refresh_Button_Text: "Atualizar"

Refresh_Button_Text: "Atualizar",
Error_Missing_Attachment_Description: "Resposta rápida não podem ser usadas porque o anexo não tem descrição. O anexo deve ter uma descrição para prosseguir.",
Error_Missing_Message: "Resposta rápida não podem ser usadas porque não há mensagem para responder. Por favor, tente novamente com uma mensagem válida."
}

5 changes: 3 additions & 2 deletions src/lib/Translation/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const ru = {
AI_Gemini_Model_Not_Configured: "Ваша модель Gemini не настроена должным образом. Пожалуйста, проверьте свою конфигурацию",
AI_Workspace_Model_Not_Configured: "Ваша AI в Workspace не настроена должным образом. Пожалуйста, свяжитесь с администратором",
AI_Something_Went_Wrong: "Что-то пошло не так. Пожалуйста, попробуйте позже.",
Refresh_Button_Text: "Обновить"

Refresh_Button_Text: "Обновить",
Error_Missing_Attachment_Description: "Нельзя использовать быстрые ответы, так как вложение не содержит описания. Вложение должно иметь описание, чтобы продолжить.",
Error_Missing_Message: "Нельзя использовать быстрые ответы, так как нет сообщения, на которое можно ответить. Пожалуйста, попробуйте снова с допустимым сообщением."
}