vicariousdrama / cornychat

🌽 Corny Chat is an open source audio space built on Jam that integrates Nostr and Lightning
https://cornychat.com
GNU Affero General Public License v3.0
19 stars 6 forks source link

Consider adding nostr nests planned events as scheduled #31

Closed vicariousdrama closed 5 months ago

vicariousdrama commented 5 months ago

Nostr Nests uses live activities for both going live, and scheduling. This is in place of using a scheduled calendar time event which corny chat has opted for.

A live activity event is kind 30311 with a tag status set to planned or live or ended.

For planned events, the scheduled start time is in the tag starts. Until the event is started, the actual streaming url is not given, but it's derivable. The d tag is the unique identifier for the planned event, and once it is live, it is included in a url with the streaming tag as follows: https://nostrnests.com/api/v1/live/4186938a-4538-491b-95a5-ff15d7149f1e/live.m3u8. The 4186938a-4538-491b-95a5-ff15d7149f1e portion of the url matches the value of the d tag.

Note that nostr nests includes a single streaming tag when planned, but then has two streaming tags once it goes live. The value of the streaming tag that should be ignored is wss+livekit://nostrnests.com:443

Unfortunately, there's nothing specific to filter on of the live activity to differentiate it as a audiospace event separate from other live activities that would appear on streaming viewers. Nostr Nests itself may be filtering on the service tag which they set to https://nostrnests.com but the goal for discovery is to allow for pulling in any audio space implementation that conforms to a common tagging approach.

For corny chat, we may be able to start with pulling all live activities, and just parsing through looking for the status as planned or live to discern scheduled or not, and filter by time. The url is deterministic based on the d tag when its nostrnests, but this may not be consistent for other implementations that come in the future.

As a first pass, it may be more practical to do a filtered pull specific to nostr nests, but revoke if not reciprocated within a reasonable period of time

vicariousdrama commented 5 months ago

Some sample events for comparison

A scheduled event https://njump.me/naddr1qqjxydeevserqce395un2dej956rjdrr943xgvfh94nrzd3kx9nx2wrxvsmxzqgwwaehxw309ahx7uewd3hkctczyqlhwrt96wnkf2w9edgr4cfruchvwkv26q6asdhz4qg08pm6w3djgqcyqqq8vect6dmx3

One that is live https://njump.me/naddr1qqjrgvfcxcunxwrp956r2vec956rjvtz95un2cf494nxvvf4vsmnzdpevcck2q3qyx6pjypd4r7qh2gysjhvjd9l2km6hnm4amdnjyjw3467fy05rf0qxpqqqpmxw9z7dre

vicariousdrama commented 5 months ago

An initial pass at this has been done for all live activities that are scheduled in the next 7 days. This applies to nostrnest.com and zap.stream events.