shazow / ssh-chat

Chat over SSH.
https://shazow.net/posts/ssh-how-does-it-even/
MIT License
5.59k stars 408 forks source link

Fixing emojis being sent in PMs when no theme is set (#414) #416

Closed sleibrock closed 2 years ago

sleibrock commented 2 years ago

In reference to #414.

When t == nil, no theme is selected, and this is the way to indicate that TERM=bot is set.

The logic is branched, and user.ID() is used in place of user.Name(). The text used in fmt.Sprintf is separated and could be lifted from the function and used as a constant instead to avoid repeated allocations if desired (if the Go compiler doesn't do that already in the build step).

shazow commented 2 years ago

Thanks!