How to replicate:
1) Type in message in chat
2) hit Send
3) Delete that message from chat
4) Recipient gets notification, opens chat, does not see message (it is deleted after all) but notification number will stay on JS Toolbar (and Hello Me module) Chat icon/link. No matter what recipient of deleted message do, notification will not go away. Only when new message is sent in that conversation (does not matter who sends it) notification will be removed.
HI, Vladimir.
Thank you for contacting us and reporting this issue.
I was able to replicate it on my test site.
I'll report it to our developers.
Zdravo Gorane.
Hvala, issue is in developers queue.
HI, Guys.
Please, check this issue with JomSocial 4.5.
HI, Vladimir.
Okay, yes... but now in 4.5 you can leave such a chat.
So if someone sent you a message and delete it right away, recipient have two options: - answer to empty message and ask what's up or just leave chat. In both cases notification icon will be gone :P
That can be little confusing for users. It would be much better if JS would detect when message is deleted and remove notification for this kind of situation, or just display notification "this message is deleted by sender". Just a suggestion...
Exactly. Notification is there but there is no new message. Not OK. Yes, notification is cleared on Leave chat option which is good, but in general there should not be notification if there is nothing to notify about the recipient of chat conversation. Maybe delay notification until there is no option to delete sent message? Not easy implementation. We have "Checking for new messages in active chat:" and "Checking for new messages in other chats:" options that raise dynamics of chat and on the other hand there is "Delete last message within:" that allows removal of messages from chat. Do as others do. Display message "This message was removed by USER_NAME" in chat (with different styling, like seen by) so there is evidence that something has triggered notification on recipient side, that same message when seen by recipient removes notification and then no further action is needed on user side.
HI, Guys.
Thank you for your feedback. You're saying -we're listen :)
Make safe copy of this file:
ROOT/components/com_community/models/chat.php
Then replace original file with patched one from package.
Patch changes chat behavior, so when creating a chat and deleting initial message - chat will be removed and not started. Also notification if already sent/queued, will be removed.
Please, test it and let mi know if it works for you.
YES, this works. Notification is shown and cleared when other participant access Chat section. Still, IMHO message that displays that there was deleted message (and by whom) is more desirable solution that can be presented for all chat participants. That way even if admin sets "Delete last message within:" to "No Limit", which allows unlimited deletion of sent messages, there will be at least some trace that some message/activity was existing in the past.
NO, not everything working as intended. Indeed when participant that received deleted message visits chat, page notification is removed. Visiting Home page again (JomSocial), notification reappears again.
Only new functionality with patched file is removal of notification on visiting Chat page. When user moves away from that page notification will appear, and disappear if moves back to Chat page.
Dziękuję Michal! I can confirm that there is no issue and solution is working. I would like to suggest that this become permanent in future JS versions.
@Vladimir one step at the time ;)
Zdravo momci!
Yes, this will be permanent solution. Will be included in future releases.
I think there is no need to inform that chat was created and deleted ;)