Add inline pulse rendering
This was broken from the last pulse related refactor. It affects slack message attachments and the preview section of the pulse screen. This introduces a render-type argument to some of the pulse rendering functions where we can use the the correct behavior (bytes + base64 encoding or a URL + references) depending on how the image will be used. Testing this is difficult as this is creating images and then depending on the render-type, encoding that image byte array into a Base64 string. I added some very basic checks that at least ensures the byte array is of the approximate right size. If we were rendering it incorrectly, we'd see the byte array size much smaller. Pretty fragile, but is the only way I could find to sanity check the results so we don't introduce a bug like this in the future.
Please register or sign in to comment