-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Added features to filter chats, edit messages, add users to group chat, share images as messages, and create dedicated group chats for events #2360
base: develop-postgres
Are you sure you want to change the base?
Changes from 68 commits
1ca936b
c42da5e
3742346
06f4af4
c18b97b
cbde8f7
9950269
77a392c
eb54545
09427e6
6fbaaa2
8fffdc5
f76dc3e
d4864a8
75fa6c3
58086e2
4d6f9a6
a68dcb4
3df2541
15385ae
65fb52d
6eff29e
e355314
e125d96
1ee07f3
4525924
f4b6fd0
74899fd
450b587
b1790e2
fe66f0a
352b6b5
9a661e5
580260a
a1ea33b
182eded
e6e5c24
789aa19
426f34c
11265e0
bb9ddc8
85f698c
d541812
635a115
9d581e8
4b3850a
da51531
5f463b0
a06cfc0
2abde8c
972ce3e
a552e05
a0afd7c
14a127a
622e2b6
ad599a9
431e77a
e520ed8
6539100
1597197
38426f0
566e8c2
38df508
a184b40
8a6c1d0
6f3d603
590d48c
44942ab
3b3f412
3260022
cf4d2de
33b5f24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -414,6 +414,7 @@ | |
"recurringEvent": "Recurring Event", | ||
"isPublic": "Is Public", | ||
"isRegistrable": "Is Registrable", | ||
"createChat": "Create Chat", | ||
"createEvent": "Create Event", | ||
"enterFilter": "Enter Filter", | ||
"enterTitle": "Enter Title", | ||
|
@@ -553,6 +554,7 @@ | |
"recurringEvent": "Recurring Event", | ||
"isPublic": "Is Public", | ||
"isRegistrable": "Is Registrable", | ||
"createChat": "Create Chat", | ||
"updatePost": "Update Post", | ||
"eventDetails": "Event Details", | ||
"eventDeleted": "Event deleted successfully.", | ||
|
@@ -1193,6 +1195,7 @@ | |
"enterDescription": "Enter Description", | ||
"publicEvent": "Is Public", | ||
"registerable": "Is Registerable", | ||
"createChat": "Create Chat", | ||
"monthlyCalendarView": "Monthly Calendar", | ||
"yearlyCalendarView": "Yearly Calender", | ||
"startTime": "startTime", | ||
|
@@ -1248,14 +1251,22 @@ | |
"endOfResults": "endOfResults" | ||
}, | ||
"userChat": { | ||
"add": "Add", | ||
"chat": "Chat", | ||
"search": "Search", | ||
"messages": "Messages", | ||
"contacts": "Contacts" | ||
"contacts": "Contacts", | ||
"create": "Create", | ||
"newChat": "New Chat", | ||
"newGroupChat": "New Group Chat", | ||
"groupInfo": "Group Info", | ||
"members": "Members", | ||
"addMembers": "Add Members" | ||
}, | ||
"userChatRoom": { | ||
"selectContact": "Select a contact to start conversation", | ||
"sendMessage": "Send Message" | ||
"sendMessage": "Send Message", | ||
"reply": "Reply" | ||
Comment on lines
+1279
to
+1280
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing translations for message editing. While "reply" functionality is supported, the translations don't include strings for editing messages, which was mentioned in the PR objectives. Add the following translation keys: "userChatRoom": {
"selectContact": "Select a contact to start conversation",
"sendMessage": "Send Message",
"reply": "Reply",
+ "editMessage": "Edit message",
+ "saveEdit": "Save changes",
+ "cancelEdit": "Cancel edit"
}
|
||
}, | ||
"orgProfileField": { | ||
"loading": "Loading...", | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -439,7 +439,8 @@ | |||||
"startDate": "Date de début", | ||||||
"endDate": "Date de fin", | ||||||
"talawaApiUnavailable": "API Talawa indisponible", | ||||||
"done": "Fait" | ||||||
"done": "Fait", | ||||||
"createChat": "Créer une discussion" | ||||||
Comment on lines
+442
to
+443
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix inconsistent translation for "done". The key "done" is translated differently across sections:
This inconsistency should be resolved by using the same translation throughout. Apply this diff to use consistent translation: "organizationEvents": {
- "done": "Fait",
+ "done": "Terminé",
"createChat": "Créer une discussion"
},
"eventListCard": {
"done": "Terminé",
"createChat": "Créer une discussion"
} Also applies to: 583-584 |
||||||
}, | ||||||
"organizationActionItems": { | ||||||
"actionItemCategory": "Catégorie de l'Action", | ||||||
|
@@ -579,7 +580,8 @@ | |||||
"registerEvent": "Inscrire à l'événement", | ||||||
"close": "Fermer", | ||||||
"talawaApiUnavailable": "API Talawa non disponible", | ||||||
"done": "Terminé" | ||||||
"done": "Terminé", | ||||||
"createChat": "Créer une discussion" | ||||||
Comment on lines
+583
to
+584
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent translation for "done". The key "done" is translated differently across sections:
This inconsistency should be resolved by using the same translation throughout. |
||||||
}, | ||||||
"funds": { | ||||||
"title": "Fonds", | ||||||
|
@@ -1204,7 +1206,8 @@ | |||||
"eventDescription": "Description de l'événement", | ||||||
"eventLocation": "Lieu de l'événement", | ||||||
"startDate": "Date de début", | ||||||
"endDate": "Date de fin" | ||||||
"endDate": "Date de fin", | ||||||
"createChat": "Créer une discussion" | ||||||
}, | ||||||
"userEventCard": { | ||||||
"starts": "Départs", | ||||||
|
@@ -1248,14 +1251,22 @@ | |||||
"endOfResults": "Fin des résultats" | ||||||
}, | ||||||
"userChat": { | ||||||
"add": "Ajouter", | ||||||
"chat": "Chat", | ||||||
"contacts": "Contacts", | ||||||
"search": "rechercher", | ||||||
"messages": "messages" | ||||||
"messages": "messages", | ||||||
"create": "créer", | ||||||
"newChat": "nouvelle discussion", | ||||||
"newGroupChat": "Nouvelle discussion de groupe", | ||||||
"groupInfo": "Informations sur le groupe", | ||||||
"members": "Membres", | ||||||
"addMembers": "Add Members" | ||||||
Comment on lines
+1265
to
+1275
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent capitalization in chat-related translations. Some translations start with lowercase letters while most translations in the file start with uppercase. This should be consistent throughout the file. - "chat": "Chat",
- "search": "rechercher",
- "messages": "messages",
- "create": "créer",
- "newChat": "nouvelle discussion",
+ "chat": "Chat",
+ "search": "Rechercher",
+ "messages": "Messages",
+ "create": "Créer",
+ "newChat": "Nouvelle discussion",
- "reply": "répondre"
+ "reply": "Répondre" Also applies to: 1206-1207 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Translate the English text to French. The string "Add Members" should be translated to French to maintain consistency. - "addMembers": "Add Members"
+ "addMembers": "Ajouter des membres" 📝 Committable suggestion
Suggested change
|
||||||
}, | ||||||
"userChatRoom": { | ||||||
"selectContact": "Sélectionnez un contact pour démarrer la conversation", | ||||||
"sendMessage": "Envoyer le message" | ||||||
"sendMessage": "Envoyer le message", | ||||||
"reply": "répondre" | ||||||
}, | ||||||
"orgProfileField": { | ||||||
"loading": "Chargement...", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -439,7 +439,8 @@ | |||||||||
"startDate": "प्रारंभ तिथि", | ||||||||||
"endDate": "समाप्ति तिथि", | ||||||||||
"talawaApiUnavailable": "Talawa API अनुपलब्ध", | ||||||||||
"done": "पूर्ण" | ||||||||||
"done": "पूर्ण", | ||||||||||
"createChat": "चैट बनाएं" | ||||||||||
Comment on lines
+442
to
+443
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move chat-related translations to the appropriate section. The translations for "done" and "createChat" appear to be misplaced in the "organizationEvents" section. These strings are related to chat functionality and should be moved to the "userChat" or "userChatRoom" sections for better organization and maintainability. Apply this diff to move the translations to the appropriate section: "organizationEvents": {
- "done": "पूर्ण",
- "createChat": "चैट बनाएं"
},
"userChat": {
+ "done": "पूर्ण",
+ "createChat": "चैट बनाएं"
}
|
||||||||||
}, | ||||||||||
"organizationActionItems": { | ||||||||||
"actionItemCategory": "क्रिया वस्तु श्रेणी", | ||||||||||
|
@@ -579,7 +580,8 @@ | |||||||||
"registerEvent": "कार्यक्रम के लिए पंजीकरण करें", | ||||||||||
"close": "बंद करें", | ||||||||||
"talawaApiUnavailable": "Talawa API अनुपलब्ध", | ||||||||||
"done": "समाप्त" | ||||||||||
"done": "समाप्त", | ||||||||||
"createChat": "चैट बनाएं" | ||||||||||
Comment on lines
+583
to
+584
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move chat-related translations to the appropriate section. Similarly, the translations for "done" and "createChat" in the "eventListCard" section should be moved to the "userChat" section to maintain consistency and avoid duplication. Apply this diff to consolidate chat-related translations: "eventListCard": {
- "done": "समाप्त",
- "createChat": "चैट बनाएं"
},
"userChat": {
+ "done": "समाप्त",
+ "createChat": "चैट बनाएं"
} 📝 Committable suggestion
Suggested change
|
||||||||||
}, | ||||||||||
"funds": { | ||||||||||
"title": "फंड", | ||||||||||
|
@@ -1204,7 +1206,8 @@ | |||||||||
"eventDescription": "कार्यक्रम विवरण", | ||||||||||
"eventLocation": "कार्यक्रम स्थान", | ||||||||||
"startDate": "प्रारंभ तिथि", | ||||||||||
"endDate": "समाप्ति तिथि" | ||||||||||
"endDate": "समाप्ति तिथि", | ||||||||||
"createChat": "चैट बनाएं" | ||||||||||
}, | ||||||||||
"userEventCard": { | ||||||||||
"starts": "प्रारंभ होगा", | ||||||||||
|
@@ -1248,14 +1251,22 @@ | |||||||||
"endOfResults": "परिणाम समाप्त" | ||||||||||
}, | ||||||||||
"userChat": { | ||||||||||
"add": "जोड़ें", | ||||||||||
"chat": "बात करना", | ||||||||||
"contacts": "संपर्क", | ||||||||||
"search": "खोज", | ||||||||||
"messages": "संदेश" | ||||||||||
"messages": "संदेश", | ||||||||||
"create": "बनाएं", | ||||||||||
"newChat": "नई चैट", | ||||||||||
"newGroupChat": "नया समूह चैट", | ||||||||||
"groupInfo": "समूह जानकारी", | ||||||||||
"members": "सदस्यों", | ||||||||||
"addMembers": "सदस्य जोड़ें" | ||||||||||
}, | ||||||||||
"userChatRoom": { | ||||||||||
"selectContact": "बातचीत शुरू करने के लिए एक संपर्क चुनें", | ||||||||||
"sendMessage": "मेसेज भेजें" | ||||||||||
"sendMessage": "मेसेज भेजें", | ||||||||||
"reply": "जवाब" | ||||||||||
}, | ||||||||||
"orgProfileField": { | ||||||||||
"loading": "लोड हो रहा है...", | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -439,7 +439,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"startDate": "开始日期", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"endDate": "结束日期", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"talawaApiUnavailable": "塔拉瓦 API 不可用", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"done": "完成" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"done": "完成", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"createChat": "创建聊天" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+442
to
+443
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consolidate redundant "createChat" translations. The translation key Apply this diff: "organizationEvents": {
"done": "完成",
- "createChat": "创建聊天"
},
"eventListCard": {
"done": "完成",
- "createChat": "创建聊天"
},
"userEvents": {
"endDate": "结束日期",
- "createChat": "创建聊天"
},
"userChat": {
"add": "添加",
"chat": "聊天",
...
+ "createChat": "创建聊天"
} Also applies to: 562-563, 1147-1148 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"organizationActionItems": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"actionItemCategory": "行动项类别", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -579,7 +580,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"registerEvent": "注册活动", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"close": "关闭", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"talawaApiUnavailable": "塔拉瓦 API 不可用", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"done": "完成" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"done": "完成", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"createChat": "创建聊天" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"funds": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"title": "基金", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1204,7 +1206,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"eventDescription": "活动描述", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"eventLocation": "活动位置", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"startDate": "开始日期", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"endDate": "结束日期" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"endDate": "结束日期", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"createChat": "创建聊天" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"userEventCard": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"starts": "开始", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1248,14 +1251,22 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"endOfResults": "结果结束" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"userChat": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"add": "添加", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"chat": "聊天", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"contacts": "联系方式", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"search": "搜索", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"messages": "消息" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"messages": "消息", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"create": "创造", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"newChat": "新聊天", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"newGroupChat": "新群聊", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"groupInfo": "集团信息", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"members": "会员", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"addMembers": "Add Members" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Translate the "Add Members" text to Chinese. The text "Add Members" is in English while this file contains Chinese translations. Apply this diff to fix the translation: - "addMembers": "Add Members"
+ "addMembers": "添加成员" 📝 Committable suggestion
Suggested change
Comment on lines
+1265
to
+1275
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add missing translations for new chat features. Several key chat features mentioned in the PR objectives are missing translations: Add the following translations to the "userChat": {
"add": "添加",
"chat": "聊天",
"contacts": "联系方式",
"search": "搜索",
"messages": "消息",
"create": "创造",
"newChat": "新聊天",
"newGroupChat": "新群聊",
"groupInfo": "集团信息",
"members": "会员",
"addMembers": "Add Members",
+ "filterChats": "筛选聊天",
+ "editMessage": "编辑消息",
+ "shareImage": "分享图片",
+ "eventChat": "活动聊天"
} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"userChatRoom": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"selectContact": "选择联系人开始对话", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"sendMessage": "发信息" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"sendMessage": "发信息", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"reply": "回复" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"orgProfileField": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"loading": "加载中...", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -508,6 +508,7 @@ type Chat { | |
updatedAt: DateTime! | ||
users: [User!]! | ||
admins: [User] | ||
unseenMessagesByUsers: JSON | ||
lastMessageId: String | ||
} | ||
|
||
|
@@ -516,7 +517,6 @@ type ChatMessage { | |
createdAt: DateTime! | ||
chatMessageBelongsTo: Chat! | ||
messageContent: String! | ||
type: String! | ||
replyTo: ChatMessage | ||
sender: User! | ||
deletedBy: [User] | ||
|
@@ -694,7 +694,8 @@ type Mutation { | |
revokeRefreshTokenForUser: Boolean! | ||
saveFcmToken(token: String): Boolean! | ||
sendMembershipRequest(organizationId: ID!): MembershipRequest! | ||
sendMessageToChat(chatId: ID!, messageContent: String!, type: String!, replyTo: ID): ChatMessage! | ||
sendMessageToChat(chatId: ID!, messageContent: String!, replyTo: ID): ChatMessage! | ||
markChatMessagesAsRead(chatId: ID!, userId: ID!): Chat | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider enhancing markChatMessagesAsRead mutation. The mutation could be improved by:
Consider this alternative design: type MarkChatMessagesAsReadPayload {
chat: Chat!
markedMessagesCount: Int!
}
extend type Mutation {
markChatMessagesAsRead(input: MarkChatMessagesAsReadInput!): MarkChatMessagesAsReadPayload!
}
input MarkChatMessagesAsReadInput {
chatId: ID!
userId: ID!
"""
Optional: Mark messages as read up to this message ID
If not provided, marks all messages as read
"""
upToMessageId: ID
} |
||
signUp(data: UserInput!, file: String): AuthData! | ||
togglePostPin(id: ID!, title: String): Post! | ||
unassignUserTag(input: ToggleUserTagAssignInput!): User | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,34 +63,83 @@ export const CREATE_CHAT = gql` | |
$organizationId: ID | ||
$isGroup: Boolean! | ||
$name: String | ||
$image: String | ||
) { | ||
createChat( | ||
data: { | ||
userIds: $userIds | ||
organizationId: $organizationId | ||
isGroup: $isGroup | ||
name: $name | ||
image: $image | ||
} | ||
) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
export const ADD_USER_TO_GROUP_CHAT = gql` | ||
mutation addUserToGroupChat($userId: ID!, $chatId: ID!) { | ||
addUserToGroupChat(userId: $userId, chatId: $chatId) { | ||
_id | ||
} | ||
} | ||
`; | ||
Comment on lines
+82
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider enhancing error handling in ADD_USER_TO_GROUP_CHAT mutation While the mutation is well-structured, consider adding:
|
||
|
||
export const MARK_CHAT_MESSAGES_AS_READ = gql` | ||
mutation markChatMessagesAsRead($chatId: ID!, $userId: ID!) { | ||
markChatMessagesAsRead(chatId: $chatId, userId: $userId) { | ||
_id | ||
} | ||
} | ||
`; | ||
Comment on lines
+90
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider retrieving Passing |
||
|
||
export const UPDATE_CHAT = gql` | ||
mutation updateChat($input: UpdateChatInput!) { | ||
updateChat(input: $input) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
export const EDIT_CHAT_MESSAGE = gql` | ||
mutation updateChatMessage( | ||
$messageId: ID! | ||
$messageContent: String! | ||
$chatId: ID! | ||
) { | ||
updateChatMessage( | ||
input: { | ||
messageId: $messageId | ||
messageContent: $messageContent | ||
chatId: $chatId | ||
} | ||
) { | ||
_id | ||
messageContent | ||
updatedAt | ||
} | ||
} | ||
`; | ||
|
||
export const SEND_MESSAGE_TO_CHAT = gql` | ||
mutation sendMessageToChat( | ||
$chatId: ID! | ||
$replyTo: ID | ||
$messageContent: String! | ||
$media: String | ||
$messageContent: String | ||
Comment on lines
+130
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add input validation to SEND_MESSAGE_TO_CHAT mutation The mutation allows both Also applies to: 137-137 |
||
) { | ||
sendMessageToChat( | ||
chatId: $chatId | ||
replyTo: $replyTo | ||
messageContent: $messageContent | ||
media: $media | ||
Comment on lines
+130
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Validate input to prevent empty messages in Both |
||
) { | ||
_id | ||
createdAt | ||
messageContent | ||
media | ||
replyTo { | ||
_id | ||
createdAt | ||
|
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.
Missing translations for chat filtering and image sharing.
While the translations cover basic chat and group management features, they're missing keys for:
These features were mentioned in the PR objectives but lack corresponding UI strings.
Add the following translation keys: