mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
feat: ephemeral channels with TTL-based auto-archiving (#232)
Co-authored-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
@@ -103,6 +103,8 @@ type RawChannel = {
|
||||
participants: string[];
|
||||
participant_pubkeys: string[];
|
||||
is_member?: boolean;
|
||||
ttl_seconds: number | null;
|
||||
ttl_deadline: string | null;
|
||||
};
|
||||
|
||||
type RawChannelDetail = RawChannel & {
|
||||
@@ -353,6 +355,8 @@ function fromRawChannel(channel: RawChannel): Channel {
|
||||
participants: channel.participants,
|
||||
participantPubkeys: channel.participant_pubkeys,
|
||||
isMember: channel.is_member ?? true,
|
||||
ttlSeconds: channel.ttl_seconds,
|
||||
ttlDeadline: channel.ttl_deadline,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ export type Channel = {
|
||||
participants: string[];
|
||||
participantPubkeys: string[];
|
||||
isMember: boolean;
|
||||
ttlSeconds: number | null;
|
||||
ttlDeadline: string | null;
|
||||
};
|
||||
|
||||
export type ChannelDetail = Channel & {
|
||||
@@ -43,6 +45,7 @@ export type CreateChannelInput = {
|
||||
channelType: Exclude<ChannelType, "dm">;
|
||||
visibility: ChannelVisibility;
|
||||
description?: string;
|
||||
ttlSeconds?: number;
|
||||
};
|
||||
|
||||
export type OpenDmInput = {
|
||||
|
||||
Reference in New Issue
Block a user