Hello,

I've noticed a super long-standing bug with how we're using Heartbeat on my site. We have a [custom] "Shout" box that, upon posting, calls the pollMessages() function in heartbeat.js to update the stream with the post the user just made.

This works perfectly well UNLESS there WEREN'T ALREADY other messages on the page.

So if you make the first post onto the "wall" it will get recorded but the page doesn't poll because pollMessages() uses this line:

if (firstUaid) {
  $.post(href, post, Drupal.heartbeat.prependMessages);
}

If I remove the if statement, then the first post will go in properly. I'm confused what the rationale for this is -- but I may just not understand it.

Comments

Stalski’s picture

Status: Active » Needs work

True, this bug has been resolved in d7. Removing the if clause would indeed fix the problem.

I don't know when I'll have time to look into this. I am actually looking for a co maintainer for heartbeat.

Offlein’s picture

Thanks, Stalski, for the super-quick reply. I wish I had the time and familiarity to co-maintain. I don't really know what it entails, to be honest, though.