Giter Site home page Giter Site logo

pongo's Introduction

pongo

Use pongo from the command line: pongo is helpfully configured to print in yellow all the JSON that will be sent along the /updates path as it runs.

  • install %pongo desk in two or more ships. i'll be using ~tes and ~dev

  • on ~tes, run: :pongo|new 'squidchat72' ~[~dev]. you will see a conversation id appear.

  • on ~dev, run: :pongo|join <conversation-id>

  • on either ship, you can now send message like so: :pongo|message <conversation-id> 'your message'

  • you can edit messages you've previously sent like so: :pongo|edit <conversation-id> <message-id> 'new message text'

  • you can react to messages you've seen: :pongo|react <conversation-id> <message-id> '๐Ÿฆ‘'

  • you can leave a conversation: :pongo|leave <conversation-id>

The yellow "sending" receipts mean that a message was processed by your urbit ship and sent out to other members of the conversation. This could be interpreted as "sent" in the user-facing display as an indicator that they are in fact connected to their urbit backend.

The yellow "delivered" receipts mean that a message was received (not seen, but deposited into their urbit ship) by all members in a conversation. This feature is currently artificially limited to conversations with 5 or fewer members. Try turning off one fakeship and sending messages to see how this works in practice. Note: ships that have us blocked will still send "delivered" receipts, but will not save or ever see the actual message.

Reactions are not limited to emojis, or validated in any way. I should add some handling around that. You can react again to the same message to override your existing reaction if any. Removing a reaction should probably just be reacting with an empty ''.

You can block and unblock ships from messaging you with these pokes:

  • {"block":{"who":"~bus"}}
  • {"unblock":{"who":"~bus"}}

To search messages by phrase (exact matches only):

  • First, come up with a unique hex identifier for the search (can be random)

  • Subscribe to path /search-results/<your-hex-id>

  • Poke with structure:

    WEIRD FORMATTING: "only-in" should be hex number WITHOUT dots or leading 0x. "only-author" should have no leading ~

    {"search":
       {"uid":"<your-hex-id>",
        "only-in":"<conversation-id>",
        "only-author:"zod",
        "phrase":"what you're searching for"
        }
      }
    
  • You can set "only-author" to null to search from all authors. In the future, you will be able to set "only-in" to null to search all conversations. Currently limited to single conversation :(

  • After user navigates away from search, do this poke: {"cancel-search":{"uid":"<your-hex-id>"}}


For structure of all pokes see /mar/pongo/action.hoon.

To see the JSON representation of scries, use these in dojo:

  • (crip (en-json:html .^(json %gx /=pongo=/all-messages/<conversation-id>/json)))
  • (crip (en-json:html .^(json %gx /=pongo=/conversations/json)))

Note: leaving a conversation does not delete its record in the database, so you will still be able to scry a read-only archive of it. We can add a way to permanently delete these later!

I will add more specific scries very soon.

pongo's People

Contributors

dr-frmr avatar willbach avatar bitful-pannul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.