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

bot api: Forced rename is not reflected in term #362

Open
shazow opened this issue Sep 2, 2020 · 2 comments
Open

bot api: Forced rename is not reflected in term #362

shazow opened this issue Sep 2, 2020 · 2 comments
Labels

Comments

@shazow
Copy link
Owner

shazow commented Sep 2, 2020

When a TERM=bot joins with a collision name and gets renamed to GuestXXX, the new name is not reflected in the bot's term line. (Should the term line even be present?)

@shazow shazow added the Someday label Sep 2, 2020
@voldyman
Copy link
Contributor

voldyman commented May 2, 2021

Tangent Alert

Should the term line even be present?

Should the bot only interact in json?

Overall design i am thinking of:

  • Update messages to use a Renderer which knows about converting a *Msg to string using the theme.
    • Rendering logic will be extracted out of messages structs and they will just hold data
    • Add 2 renderers, one which uses the current logic and a new JsonRenderer
  • on TERM=bot-json or something, use theme mono and JsonRenderer.
  • Optional: Add a client package in ssh-chat repo with message structure definitions. Clients will uses this package to connect and parse messages from Go.

Since each line will be a well-formed json message, users can optionally use the go lib or pipe the output of ssh to scripts

@shazow
Copy link
Owner Author

shazow commented May 2, 2021

Yea, an alternative JSON API is certainly desirable, but I think 90% of people want a plaintext API since they're just messing around with shell scripts or equivalent.

And yes, using the Theme system to render JSON was also something I had in mind.

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

No branches or pull requests

2 participants