<% json_data = notification.json_data %>
<% user = User.find_by(id: json_data["user"]["id"]) %>
<% cache "broadcast-html-#{notification.json_data['broadcast']['title']}" do %>
  <a href="<%= json_data["user"]["path"] %>" class="small-pic-link-wrapper">
    <div class="small-pic">
      <img src="<%= ProfileImage.new(user).get %>" alt="link to <%= json_data["user"]["username"] %>'s profile">
    </div>
  </a>
  <div class="content notification-content broadcast-content">
    <%= json_data["broadcast"]["processed_html"].html_safe %>

    <% if notification.json_data['broadcast']['type_of'] == "Welcome" %>
      <div class="opt-out"><a href="<%= user_settings_path(tab: :notifications) %>">Go to your settings to manage your notification settings.</a></div>
    <% end %>
  </div>
<% end %>
