By the looks of tests/privatemsgsend.test, this is intentional, however I can't really figure out why that would be. I can send e-mail to myself, why not private messages? Furthermore, the ability to send to yourself a message makes testing out this module a lot easier than having to message between users, log out, log in, check if it was received, etc.

At the very least though, it ought not to fail silently. I thought the module didn't work at all until I tried sending to my 'peon' user instead.

Comments

gabriel.’s picture

I think users shouldn't be allowed to send private messages to themselves; it's kind of pointless. Or if you do want to keep this feature, at least have an option to disable it.

This isn't email; it's a simple user-to-user messaging service and should behave as such.

webchick’s picture

How is it pointless? I might want to send myself a list of things I need to do tonight, or a reminder to call so and so about their birthday. If I'm addicted to a social networking site, chances are I check my private messages more often than I do my e-mail.

When I join a new site, I like to play around with the features it offers. So I want to send myself a private message and see what it's going to look like when one of my friends receives one from me. Without this feature, the only way to tell what happens when people receive a private message is to wait around until I receive one from someone else, which might never happen.

I can do this on Facebook, and I can do it on MySpace. So if two of the major social networking sites offer this feature, why can't I do it on a Drupal-based social networking site? Nothing says you /have/ to message yourself; Facebook certainly doesn't list it as one of their cool, cutting edge features. But it behaves as you'd expect when you do it.

Furthermore, as I said, it's a complete pain to test this module without this feature.

gabriel.’s picture

Status: Fixed » Active

I'm sorry, "pointless" was a poor choice of words.

I hadn't realized that Facebook allowed you to compose a message to yourself (it's just not something I do; I typically just send messages to other friends ;) ).

I see the point of your argument. I guess it's not too big a deal, but it'd still be nice if I had the ability turn this feature off. It's the little things like this that bug me when they behave in an unintended manner.

So I want to send myself a private message and see what it's going to look like when one of my friends receives one from me.

Would a "preview" function be better for this sort of thing? To me, it makes more sense.

morbus iff’s picture

+1 to keeping it in. I send email to myself for todo-like lists. Being able to replicate that inside privatemsg ("be sure to bug the admin about fixing that comment") would be useful. No configuration necessary.

michelle’s picture

Just saw this on IRC. +1 to self messaging. -1 to a setting. Just let it work. There's no reason to exclude people from messaging themselves. It's not like it hurts something.

Michelle

litwol’s picture

Status: Active » Fixed

I've removed all invalidations of message sending to self.

Let me know if i missed any.

thanks.

enjoy the module.

dami’s picture

Status: Fixed » Needs work

This also needs to be removed, line 1644 in privatemsg.module:

  if ($sender->uid == $recipient->uid) {
    return FALSE;
  }
litwol’s picture

Status: Needs work » Fixed

You probably have an old release, that line (and number of others) have been removed long ago.

Anonymous’s picture

Status: Active » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nick444’s picture

Title: Can't send private messages to yourself » Send private messages to yourself - I don't want to!
Version: 5.x-2.x-dev » 7.x-2.x-dev
Category: Bug report » Support request
Issue summary: View changes
Status: Closed (fixed) » Active
Issue tags: +privatemsg

Hello all, I hope you are well.

I understand there has been a discussion about how good it is to have the chance to message yourself.

However, I for one think it looks like a design defect; if people want to write messages to themselves, there are always note paper, diaries, iPhone dingaling reminders etc.

So, does anyone know how you could get rid of that link?

Someone suggested the below, but it was removed from the module a long time ago and in any case seems incompatible with the lastest versions (found in privatemsg.module) :

if ($sender->uid == $recipient->uid) {
return FALSE;
}

Hint if it helps: There is no $sender anymore.

I'd do it myself, but while I can CSS anyone's face off, real development coding like PHP baffles me something awful :(

Thanks in advance if anyone an help :)

webchick’s picture

Issue summary: View changes

Reverting issue summary to previous state.

berdir’s picture

Title: Send private messages to yourself - I don't want to! » Can't send private messages to yourself
Version: 7.x-2.x-dev » 5.x-1.1
Category: Support request » Bug report
Status: Active » Closed (fixed)

Reverting everything, do *not* re-open issues that have been closed 6 (!) years ago.

For the record, this is now a setting in 7,x-2.x.