Possible to send a buddypress message to myself?
-
As part of a role-playing type scenario, I would like a user to trigger a message to themselves that looks like it came from a game character. To do this, I am using messages_new_message and setting the appropriate sender_id and recipient_id. This is failing, and I’m trying to determine why. Some data:
a. If I have the user send a buddypress message to another user from the npc, it works.
b. If I have the user send a buddypress message to themselves from the npc, it silently fails.
c. If I attempt to send myself a message via the default UI access, I get an error: “A person(s) you are attempting to send a message to has blocked private messages. Your message has not been sent.”These facts lead me to believe that though I am setting the sender_id to be something other than the user’s own id, the code is being run as a user with the same id as the intended recipient, and it is failing some simple check somewhere that I may be able to just comment out. (In other words, somewhere something like “if recipient_id == bp_loggedin_user_id()” is preventing what I want to do.
Can anyone confirm my suspicions and/or point me in the right direction?
Many thanks,
thyreos
- The topic ‘Possible to send a buddypress message to myself?’ is closed to new replies.