<%=
   group = nil
   member = nil
   if activity.trackable
     group = activity.trackable.group
     member = activity.trackable.user
   end
   # if we dont have them yet try to get them from the params
   if !group && activity.parameters.include?(:group_id)
     group = Group.find(activity.parameters[:group_id]) rescue nil
   end
   if !member && activity.parameters.include?(:member_id)
     member = User.find(activity.parameters[:member_id]) rescue nil
   end

   t('.updated_member_of_group',
     action: activity.parameters[:action] || 'updated',
     owner: get_activity_owner(activity),
     member: member ? link_to_if(can?(:red, member), member.name, member) : (activity.parameters[:member_name] || t('public_activity.a_member')),
     group: group ? link_to_if(can?(:read, group), group.name, group) : (activity.parameters[:member_name] || t('public_activity.a_group_which_no_longer_exists')),
     role: activity.parameters[:level] == 'regular' ? t('.regular_member') : t('.leader')
   ).html_safe
%>