Skip to content

👨🏾‍🌾 req#5 #1219

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

Merged
merged 15 commits into from
Feb 17, 2025
Merged
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
28 changes: 19 additions & 9 deletions frontend/src/components/GroupMessageChatArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function GroupMessageChatArea(props) {

const sendReplyMessage = (block_id) => {
let currentMessage = replyMessageText;
if (!currentMessage.trim().length) {
if (!currentMessage.trim().length > 0) {
let temp = replyInputFlags;
temp[block_id] = false;
setReplyInputFlags(temp);
Expand Down Expand Up @@ -244,15 +244,25 @@ function GroupMessageChatArea(props) {
//setShouldScroll(true);

// Send notifications
if (particiants?.length > 0) {
setTimeout(() => {
particiants.forEach((user) => {
if (user._id.$oid !== profileId) {
sendNotifyUnreadMessage(user._id.$oid);
}
});
}, 0);
if (tagUsers.length > 0) {
tagUsers.map((tag_id) => {
if (tag_id !== profileId) {
sendNotifyUnreadMessage(tag_id);
}
return false;
});
} else {
if (particiants?.length > 0) {
setTimeout(() => {
particiants.forEach((user) => {
if (user._id.$oid !== profileId) {
sendNotifyUnreadMessage(user._id.$oid);
}
});
}, 0);
}
}
setTagUsers([]);
};

const styles = {
Expand Down