forked from Kieran/zap.stream
Add ends timestamp
This commit is contained in:
parent
c4aaadd48a
commit
ec2ef2142b
@ -52,7 +52,8 @@ export function NewStream({
|
|||||||
const now = unixNow();
|
const now = unixNow();
|
||||||
const dTag = findTag(ev, "d") ?? now.toString();
|
const dTag = findTag(ev, "d") ?? now.toString();
|
||||||
const starts = findTag(ev, "starts") ?? now.toString();
|
const starts = findTag(ev, "starts") ?? now.toString();
|
||||||
return eb
|
const ends = findTag(ev, "ends") ?? now.toString();
|
||||||
|
eb
|
||||||
.kind(30_311)
|
.kind(30_311)
|
||||||
.tag(["d", dTag])
|
.tag(["d", dTag])
|
||||||
.tag(["title", title])
|
.tag(["title", title])
|
||||||
@ -61,6 +62,10 @@ export function NewStream({
|
|||||||
.tag(["streaming", stream])
|
.tag(["streaming", stream])
|
||||||
.tag(["status", status])
|
.tag(["status", status])
|
||||||
.tag(["starts", starts]);
|
.tag(["starts", starts]);
|
||||||
|
if (status === StreamState.Ended) {
|
||||||
|
eb.tag(["ends", ends]);
|
||||||
|
}
|
||||||
|
return eb;
|
||||||
});
|
});
|
||||||
console.debug(evNew);
|
console.debug(evNew);
|
||||||
System.BroadcastEvent(evNew);
|
System.BroadcastEvent(evNew);
|
||||||
|
Loading…
Reference in New Issue
Block a user