<% if current_user.yammer_staging %>
  <script type="text/javascript" src="https://assets.staging.yammer.com/platform/yam.js"></script>
<% else %>
  <script type="text/javascript" src="https://assets.yammer.com/platform/yam.js"></script>
<% end %>
<script type="text/javascript">
  yam.config({appId: '<%= ENV['CONSUMER_KEY'] %>'});
  <% if signed_in? %>
    var access_token = "<%= current_user.access_token %>";
  <% end %>
</script>
<% if signed_in? %>
  <meta property="yammer-network" content="<%= current_user.yammer_network_id %>">
<% end %>

<% if current_user.yammer_staging %>
  <script type="text/javascript" src="https://assets.staging.yammer.com/platform/yam.js"></script>
<% else %>
  <script type="text/javascript" src="https://assets.yammer.com/platform/yam.js"></script>
<% end %>
<script type="text/javascript">
  <% if current_user && current_user.yammer_staging %>
    yam.config({appId: '<%= ENV['STAGING_CONSUMER_KEY'] %>'});
  <% else %>
    yam.config({appId: '<%= ENV['CONSUMER_KEY'] %>'});
  <% end %>
  <% if signed_in? %>
    var access_token = "<%= current_user.access_token %>";
  <% end %>
</script>
<% if signed_in? %>
  <meta property="yammer-network" content="<%= current_user.yammer_network_id %>">
<% end %>

Fix embedded feed on Yammer staging
Fix embedded feed on Yammer staging
