There was a bug in the music player, which would cause audio files to play when loading previous messages as the user scrolled up. Managed to trace this to the music player modifer, which gets called on activity rendering, both when the message is created, and when the message is loaded from previous activities.
I fixed this by passing the options from Views.ChannelPane through to the Views.ShowActivity, which in turn passes options to the Modifiers.process() function, which in turn passes the options to the modifier callbacks as a third argument.
Then the music player modifier checks for the new silence_music option, which is passed when called from the loadMoreActivities() function.
Also, the music player modifier previously checked for if true and Kandan.Data.Channels.activeChannelId()? before playing the audio file. After looking through the entire git blame history of that line, apparently the if true part has been there since a rewrite of the plugin a ways back. It doesn't look like it's ever been functional, so I'm guessing it was just left over from debugging and they forgot to remove it before committing, and just no one has ever removed it. I.e. it was never functional in any way, so I removed that now too.
There was a bug in the music player, which would cause audio files to play when loading previous messages as the user scrolled up. Managed to trace this to the music player modifer, which gets called on activity rendering, both when the message is created, and when the message is loaded from previous activities.
I fixed this by passing the options from
Views.ChannelPane
through to theViews.ShowActivity
, which in turn passes options to theModifiers.process()
function, which in turn passes the options to the modifier callbacks as a third argument.Then the music player modifier checks for the new
silence_music
option, which is passed when called from theloadMoreActivities()
function.Also, the music player modifier previously checked for
if true and Kandan.Data.Channels.activeChannelId()?
before playing the audio file. After looking through the entire git blame history of that line, apparently theif true
part has been there since a rewrite of the plugin a ways back. It doesn't look like it's ever been functional, so I'm guessing it was just left over from debugging and they forgot to remove it before committing, and just no one has ever removed it. I.e. it was never functional in any way, so I removed that now too.