Friends Plugin - is now a friend with

I want to remove the wire post that happens every time someone accepts a friend request. It is not necessary and clutters up the activity feed. How do I remove the "is now a friend with"? I saw an old plugin but it does not work on 1.9

  • Also is there a way to remove all the ones that are already posted?

  • I would not recommend removing the entries from the database; it is easy to filter them out instead. For example, in pages/river.php

    $options['wheres']=array("rv.action_type != 'friend'");

    elgg_list_river($options);

  • That worked good filtering. I also commented out the code in the /mod/friend_request/actions/approve.php. Should I do that also? It stop adding new ones. But since I can filter not sure if I should undo this.

     

     

    // add to river
            /*    elgg_create_river_item(array(
                "view" => "river/relationship/friend/create",
                "action_type" => "friend",
                "subject_guid" => $user->getGUID(),
                "object_guid" => $friend->getGUID(),
            ));
             elgg_create_river_item(array(
                "view" => "river/relationship/friend/create",
                "action_type" => "friend",
                "subject_guid" => $friend->getGUID(),
                "object_guid" => $user->getGUID(),
            )); */
            //end add to river 

  • Well, I would suggest your code should be consistent. So either you prevent the creation of river entries and remove the existing ones, or you just filter the ones you do not want but you still keep adding them in case you want to use them at one point. As previously mentioned, I would just filter.

  • Thanks. That is what I went with, just filtering. I was only thinking how many entries it adds up to with 100's of members all being friends to each other.

  • I would not worry about it; you should have a lot more river entries with people other activities.