Skip to main content

is_reply_vocabulary 0.2.1 copy "is_reply_vocabulary: ^0.2.1" to clipboard
is_reply_vocabulary: ^0.2.1 copied to clipboard

Where a reply goes and the message it posted, as values that name exactly one conversation: a web address or a Slack channel and thread, with their JSON.

Changelog #

0.2.1 #

  • New: ReplyEndpoint.admitsAddress(to, path), whether a request goes to an address the endpoint's replies are sent to, as one rule for every case. RepliesUnderWebAddress admits what its prefix covers. RepliesInSlackConversation admits exactly RepliesInSlackConversation.postMessagePath (/api/chat.postMessage) on its own origin, so no other Slack method, such as chat.delete, is reachable. It checks the address only: a Slack address is the same for every conversation.
  • New: ReplyEndpoint.redirectsStayUnder, the path prefix a redirect of an admitted request must stay under: the prefix for a web address, /api/ for Slack. It bounds redirects only, never what a reply may reach.
  • New: ReplyContent, a reply's ReplyText and an optional footer, with encodeReplyContent / decodeReplyContent.
  • No JSON changes.

0.2.0 #

  • Breaking: encodeReplyEndpoint and encodePostedMessage return a checked_json JsonObject instead of a Map<String, Object?>. The JSON they write is unchanged, byte for byte; jsonEncode writes a JsonObject as it is. A caller that put the result inside another map or list needs no change. One that read it by key, spread it or added to it reads it through a reader, raw, withFields or without instead.

0.1.2 #

  • decodeReplyEndpoint and decodePostedMessage read their object through checked_json's JsonObject instead of a map read by key. They take, accept, refuse and say the same things as before.

0.1.1 #

  • New: ReplyText, a reply's text, made only by parse, which returns null for text of only whitespace or Unicode format characters (Cf, such as U+200B) and otherwise keeps it exactly, untrimmed. It has no length limit. With encodeReplyText / decodeReplyText, a plain JSON string.

0.1.0 #

  • ReplyEndpoint, RepliesUnderWebAddress, RepliesInSlackConversation, SlackChannelId, encodeReplyEndpoint and decodeReplyEndpoint moved from is_docking_station_api 0.5.0, so a package that needs where a reply goes, such as is_effects, doesn't depend on the docking station. The JSON they write is unchanged, byte for byte.
  • SlackThreadTimestamp is now SlackMessageTimestamp: a Slack ts names any message, and a thread is named by its root message's. The field on RepliesInSlackConversation is still thread, and its JSON key is still "thread".
  • New: PostedMessage, the message a reply posted, with PostedUnderWebAddress (an AddressPrefix and a ServerAssignedMessageId) and PostedInSlackConversation (a SlackChannelId and a SlackMessageTimestamp), each made by answering(endpoint, id) so its conversation is the endpoint's, and encodePostedMessage / decodePostedMessage, as strict as the endpoint pair.
0
likes
140
points
42
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Where a reply goes and the message it posted, as values that name exactly one conversation: a web address or a Slack channel and thread, with their JSON.

License

Apache-2.0 (license)

Dependencies

checked_json, is_web_address_vocabulary

More

Packages that depend on is_reply_vocabulary