I see the new version of PHP maker released today supports a newmessage.chatify event. I'd love to use this to give visual notification to the receiver of a message that they have a message waiting for them - open the chatify box, change the color, etc. Can anybody explain to me how to notify the logged in user they have a chatify message using this new event handler? Thanks!
"newmessage.chatify" event
-
- User
- Posts: 65
Sorry - not understanding:
1) Suppose I want to just have an alert "New Chat Message" pop up in any part of the phpmaker project -
-Where would I put this? How exactly would I code that?
THANKS!!
-
- User
- Posts: 65
Well, I added this to the Global startup script:
$(document).on("newmessage.chatify", (e, args) => {
// console.log(args); // Check the arguments first
// Do what you need
alert("You have received a message in chat.");
});
However, no effect - what am I doing wrong?
-
- User
- Posts: 65
Aha - yes there is an error --> failed sending the message. please check your server response. code.js:512
I've double checked permissions for the folders per the phpmaker instructions. What else might I be missing?