Commit 78b97d4e authored by Robert Lyon's avatar Robert Lyon
Browse files

Add copy of accepting message in acceptee's outbox (Bug #1389913)



To test:
User A requests friendship of User B
User A has copy of request in their outbox

User B has request in their inbox
User B accepts the request

User A has copy of acceptance in their inbox

Before patch:
User B has no copy of acceptance in outbox

After patch:
User B has copy of acceptance in outbox

- Also fixed if user rejects the request as well

Change-Id: If9097fdbfe26362e949acdfbb93e3fb369d94a6c
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent dde1201b
......@@ -2139,6 +2139,7 @@ function acceptfriend_submit(Pieform $form, $values) {
$n = new StdClass;
$n->url = profile_url($USER);
$n->users = array($user->id);
$n->fromuser = $USER->get('id');
$lang = get_user_language($user->id);
$displayname = display_name($USER, $user);
$n->message = get_string_from_language($lang, 'friendrequestacceptedmessage', 'group', $displayname, $displayname);
......
......@@ -79,6 +79,7 @@ function denyrequest_submit(Pieform $form, $values) {
$n = new StdClass;
$n->url = profile_url($USER, false);
$n->users = array($user->id);
$n->fromuser = $USER->get('id');
$lang = get_user_language($user->id);
$displayname = display_name($USER, $user);
$n->urltext = $displayname;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment