Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load notification images as raw data from main process #200

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented Dec 17, 2024

This PR attempts to solve #191 by fetching each user avatar image through the main process, using a proxy if configured for a particular account, then using Electron IPC to pass the raw image data to the renderer process and inject it dynamically into the DOM.

This uses the technique described in this SO answer: https://stackoverflow.com/a/77178841/1877316

To do

This works for the public images, but doesn't work for the proxied GitHub Enterprise server images and I'm not sure why. It seems that the problem might be the fetching itself; the web server looks like it might be returning a generic "image not found" image for each one.

Ah, I think it's because not only do the images require being proxied, they require having a logged-in session to the http server for the Enterprise instance! I wonder if we can somehow use Octokit to fetch the images?

@sirbrillig
Copy link
Owner Author

@sirbrillig
Copy link
Owner Author

It's possible this may not be something we can do:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant