The code above works to restrict private messages to to only friends, but the message the user gets if they try to message someone who is not a friend is:
“The message was not sent. Please try again later.”
Is there anyway to change this message to something like:
“Sorry, you can only message connections within your network”