-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve the display of Discord code blocks when bridging to IRC #81
Comments
Hello, currently code blocks are formatted using the monospace formatting indicator Unfortunately, this is not widely supported by many IRC clients, but it is the only de facto standard for this I am aware of. While we may be able to just send a larger text block to represent this, I am leery to make the bot emit more lines than necessary where it can be avoided. This is the current behavior on a client that supports the As you can see, even on supported clients we're not properly prefixing successive lines with the monospace formatting code. So there's definitely work to be done here regardless. |
Interesting, thanks! It makes sense to prioritize fixing the actual bug that you mentioned. For the rest of it, I'm just using the default web client somebody set up, that seems to be https://codeberg.org/emersion/gamja. I'm not sure how hard it would be to support this formatting code there (I don't know much about how IRC works), but I filed https://todo.sr.ht/~emersion/gamja/167 and https://todo.sr.ht/~emersion/goguma/160 for it. Perhaps you could consider adding an option of leaving backticks in, instead of monospace? Update: This makes sense especially for inline backticks since Dis4IRC converts backticks typed in IRC to Discord's code blocks. I think using both monospace and backticks is best for that. For multi-line code blocks, it's more questionable because it causes more lines, but I'd still use it if it was an option. Are there free IRC clients that support this monospace extension? I'm mostly interested in Mac or Android, but you could document them in the README? |
I made #83 that inserts backticks on the IRC side. It does not fix the bug with multiline code blocks. As I say over there, I'm not sure it's a good idea to merge it if some people prefer the other way, since I didn't make any configuration for this yet. Two additional thoughts:
See the PR for how it looks with the backticks, which I think is clearer. Out of curiosity, what's the client you are using? Does it support the soju bouncer? (But, in any case, I think gamja and liberachat web clients would be the ones I'd want to keep in mind for my Discord-IRC bridge) |
I use TheLounge as my client, but I'm not as active as I once was. It shouldn't have any problems connecting to IRC servers or IRC bouncers but I am not familiar with soju specifically. Ultimately for me it was just about having a good way to have the same client configurations, unread/read indicators, etc. across a comically large number of devices. https://github.com/thelounge/thelounge I am not opposed to including a mode where we pass through the markdown directly to IRC more or less unchanged, but I am not sure what IRC clients support that and whether it's worth including as a configuration option. |
thelounge is quite interesting, thanks for telling me about it! I think it doesn't make much sense to learn about soju if you use it, since it covers the same usecase. https://chat.sr.ht serves a similar function to somebody setting up an always-on instance of thelounge for you to use (assuming you don't feel the need to use IRC clients other than thelounge), and thelounge looks easier to configure for self-hosting (there's one thing to configure, instead of a bouncer + a client). |
If I type in Discord:
I get this on IRC:
I wonder if this could be improved.
It would help if the bot could leave the "```python" line and the closing backticks on the IRC side.
It would be even better if it could be indicated that these lines come from a single Discord message. If something even better could happen -- that is even better!
P.S. Thanks for the nice project with the simple setup and clear instructions! It helps a lot.
The text was updated successfully, but these errors were encountered: