Skip to content

actions

Evan Feenstra edited this page Nov 4, 2020 · 2 revisions

The invite object returned from hub may have an action string. (example create_podcast:123456). These actions should be run on signup BEFORE showing the user the main screen (like on the final Your Ready to Use Sphinx screen)

If the action starts with create_podcast:

  • get the podcast ID by splitting on ":"
  • tribe server GET /podcast?id={ID}
  • create a tribe with params from that podcast info
{
  title: podcast.title,
  img: podcast.image,
  description: podcast.description,
  feed_url: podcast.url,
  tags:['Podcast'],
  .....
}

If the action starts with join_tribe:

  • split on ":" (join_tribe:{TRIBE_UUID}:{TRIBE_HOST}
  • auto-join the tribe on signup

https://github.com/stakwork/sphinx-android/blob/master/src/store/actions.ts

Clone this wiki locally