Reply to self fix

Use this forum to talk about Nova and ask any questions you may have about it. Please use the Help & Support forum if you have found a bug or need help getting something working.

Williams Sun Jan 15, 2017 1:09 am

Reply to self fix

So sometimes I have to go into my sent PMs to follow up on them and chase for a reply. In Nova's current behaviour, going to your sent messages and hitting Reply sets you as the recipient (as you were the sender for the previous message). I did that to myself 3 times tonight, so I decided to see if I could fix that behaviour.

I've managed to get it to do what I want for single replies using one line of code. If you are replying to a PM with more than one recipient then it will only pull the first recipient from the list on the previous PM, but given that the reply to all option is then presented and already removes you from the recipients, it works well enough for what I need.

Here's my line of code:

Code: Select all
            // check if you're replying to yourself
            $selected = ($selected == $this->session->userdata('userid')) ? $recipient_list[0] : $selected;


It would go after line 665 in nova/modules/core/controllers/nova_messages.php (I've got it in a custom write function in /application/controllers/messages.php)


I think this might be a candidate worth considering for the next patch release - though I don't know if you'd be happy leaving it as pulling only the first recipient from the list, or if you'd want to do a more robust checking process, just in case someone accidentally hits reply instead of reply to all.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Sun Jan 15, 2017 11:55 am

Re: Reply to self fix

If you want to submit a pull request through Github (on the 2.4/develop branch), I'm happy to get this into the next release.
User avatar

Posts: 7567


Williams Sun Jan 15, 2017 4:24 pm

Re: Reply to self fix

Took a bit of time to figure out how to do that (still not fully used to GitHub), but I think I got it right: https://github.com/anodyne/nova/pull/273
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288



Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron