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

Permit sending "rich" content via notify #355

Closed
wants to merge 1 commit into from

Conversation

rdaum
Copy link
Owner

@rdaum rdaum commented Jul 6, 2024

Changes the RPC "Notify" event to carry a full MOO Var instead of only a string, along with an optional content-type.

The builtin function "notify" is now modified to take an optional third argument, which is a content / mime-type. The intent here is to allow cores & clients connected to them to do smarter things with richer content.

For default (no argument), or for any content-type which starts with "text/" the 2nd argument is expected to be a MOO string, same as usual, and E_TYPE is raised for any other value types.

For any other content type, the value is allowed to be passed through without modification and is up to the client to interpret it.

The existing telnet client just turns everything into strings, relying on the default .to_string functionality on Var.

Changes the RPC "Notify" event to carry a full MOO "Var" instead of a
string, along with a content-type.

The builtin function "notify" is now modified to take an optional
third argument, which is a content / mime-type. The intent here is to
allow cores & clients connected to them to do smarter things with
richer content.

For default (no argument), or for any content-type which starts with
"text/" the 2nd argument is expected to be a MOO string, same as
usual, and E_TYPE is raised for any other value types.

For any other content type, the value is allowed to be passed through
without modification and is up to the client to interpret it.

The existing telnet client just turns everything into strings, relying
on the default .to_string functionality on Var.
@rdaum rdaum closed this Aug 4, 2024
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.

None yet

1 participant