WildcatIP / other.js

The Chatternet feature platform
GNU Affero General Public License v3.0
7 stars 1 forks source link

Expose channel messages #61

Open tonygentilcore opened 8 years ago

tonygentilcore commented 8 years ago

Via the Chatternet interface. This'll let rechat work as expected instead of the hack here: https://github.com/other-xyz/other.js/blob/master/builtins/rechat.other.js#L21

kharmabum commented 7 years ago

My feeling is we should punt on this until we have more clarity around the specs/designs for the next version of rechat (that both iOS and web will support, which we may already). Then we can determine what the requirements are in terms of capabilities not yet supported by Other.js and tackle those instead of tweaking what (I think) is a stop-gap.

tonygentilcore commented 7 years ago

Can you elaborate on how you expect rechat to change?

/cc @mtkurlowski

kharmabum commented 7 years ago

I'm not sure how rechat currently works on web. My understanding is rechat is triggered by a chat complete result associated with a MessageOptions feature which takes a message and returns results presenting actions the identity is allowed to take on the specific message.

In my mind the steps would be:

  1. User long presses or CMD-clicks a message
  2. This triggers an event which is handled by Other.js
  3. A MessageOptions feature handles the event in Other.js and returns string results for the message ("edit", "delete", "rechat")
  4. The user selects the "rechat" result which triggers the Rechat feature to return its own results (channels) and set a "message panel action"
  5. This UI is displayed:
screen shot 2016-12-06 at 5 13 55 pm

The requirements for the above are:

  1. A new event for interacting with a message that is handled by a MessageOptions feature
  2. The ability to detect whether or not the active identity is an owner of the channel/message (so the MessageOptions feature knows what results to provide
  3. The ability to make authenticated requests from within Other.js to support actions like "delete"
  4. The ability for a feature (e.g. rechat) to set a "message panel action"
kharmabum commented 7 years ago

AFAIK, 1-4 are not currently supported by Other.js and what I think we should be focusing on adding.

tonygentilcore commented 7 years ago

Totally agreed. You're describing #109. This issue is about a feature being able to see the messages in a channel which unlocks a variety of different functionality. To your suggestions about prioritization, that's in line w/ what's laid out here https://github.com/other-xyz/other.js/milestone/12. Let's keep this issue on topic please.

kharmabum commented 7 years ago

@tonygentilcore OK. In my mind, exposing channel messages would be available via a request to the events endpoint. Is the goal of this issue to provide an additional mechanism which returns messages that have already been fetched by the embedder?