diff --git a/packages/examples/sdk-backend-node/src/spaces/index.ts b/packages/examples/sdk-backend-node/src/spaces/index.ts index e3fda1b7f..9689045d5 100644 --- a/packages/examples/sdk-backend-node/src/spaces/index.ts +++ b/packages/examples/sdk-backend-node/src/spaces/index.ts @@ -55,7 +55,7 @@ export const runSpacesUseCases = async (): Promise < void > => { ╚════██║██╔═══╝ ██╔══██║██║ ██╔══╝ ╚════██║ ███████║██║ ██║ ██║╚██████╗███████╗███████║ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚══════╝ - + `) console.log('PushAPI.user.create'); @@ -136,18 +136,22 @@ async function PushAPI_space_create( signer: signer, }); + const now = new Date(); + const start = new Date(now.getTime() + 10 * 60000) + const end = new Date(now.getTime() + 60 * 60000); + const response = await PushAPI.space.create({ spaceName, spaceDescription, - members: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], + listeners: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], spaceImage, - admins: [], + speakers: [], isPublic: true, signer: signer, pgpPrivateKey: pgpDecrpyptedPvtKey, env: env as ENV, - scheduleAt: new Date("2023-07-15T14:48:00.000Z"), - scheduleEnd: new Date("2023-07-15T15:48:00.000Z") + scheduleAt: start, + scheduleEnd: end }); console.log('PushAPI_chat_createSpace | Response - 200 OK'); if (!silent) { @@ -174,6 +178,11 @@ async function PushAPI_space_update( signer: signer, }); + const now = new Date(); + const start = new Date(now.getTime() + 10 * 60000) + const end = new Date(now.getTime() + 60 * 60000); + + // Actual API // Convert image to base 64 and pass // This is an idempotent operation, meaning it requires all space info to be passed no matter if only few things change @@ -182,16 +191,16 @@ async function PushAPI_space_update( spaceId, spaceName, spaceDescription, - members: [ + listeners: [ `eip155:${randomWallet1}`, `eip155:${randomWallet2}`, `eip155:${randomWallet3}`, `eip155:${signer.address}`, ], spaceImage, - admins: [`eip155:${signer.address}`], // takes signer as admin automatically, add more if you want to - scheduleAt: new Date("2023-07-15T14:48:00.000Z"), - scheduleEnd: new Date("2023-07-15T15:48:00.000Z"), + speakers: [`eip155:${signer.address}`], // takes signer as admin automatically, add more if you want to + scheduleAt: start, + scheduleEnd: end, status: PushAPI.ChatStatus.PENDING, signer: signer, pgpPrivateKey: pgpDecrpyptedPvtKey, @@ -246,9 +255,9 @@ async function PushAPI_space_start_and_stop( dictionaries: [adjectives, colors, animals], }), spaceDescription, - members: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], + listeners: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], spaceImage, - admins: [], + speakers: [], isPublic: true, signer: signer, pgpPrivateKey: pgpDecrpyptedPvtKey, @@ -314,9 +323,9 @@ async function PushAPI_space_approve( dictionaries: [adjectives, colors, animals], }), spaceDescription, - members: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], + listeners: [`eip155:${randomWallet1}`, `eip155:${randomWallet2}`], spaceImage, - admins: [], + speakers: [], isPublic: true, signer: signer, pgpPrivateKey: pgpDecrpyptedPvtKey, @@ -612,4 +621,4 @@ async function PushAPI_space_trending(silent = !showAPIResponse) { if (!silent) { console.log(response); } -} \ No newline at end of file +} diff --git a/packages/examples/sdk-frontend/pages/spaces/index.tsx b/packages/examples/sdk-frontend/pages/spaces/index.tsx index bf2d2eb27..80cf3ae9c 100644 --- a/packages/examples/sdk-frontend/pages/spaces/index.tsx +++ b/packages/examples/sdk-frontend/pages/spaces/index.tsx @@ -6,7 +6,7 @@ import Link from 'next/link'; import { useSpaceComponents } from './../../components/Spaces/useSpaceComponent'; import { useContext, useEffect, useState } from 'react'; import { useAccount, useSigner } from 'wagmi'; -import * as PushAPI from "@pushprotocol/restapi"; +import * as PushAPI from '@pushprotocol/restapi'; import { ENV } from '@pushprotocol/restapi/src/lib/constants'; import { AccountContext } from '../../contexts'; @@ -14,7 +14,7 @@ const Spaces: NextPage = () => { const { address } = useAccount(); const { data: signer } = useSigner(); - const {pgpPrivateKey, setPgpPrivateKey} = useContext(AccountContext); + const { pgpPrivateKey, setPgpPrivateKey } = useContext(AccountContext); const { SpaceWidgetComponent } = useSpaceComponents(); const env = ENV.DEV; @@ -70,10 +70,10 @@ const Spaces: NextPage = () => { export default Spaces; const Section = styled.div` - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - gap: 20px; - wrap: wrap; -}`; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + gap: 20px; + flex-wrap: wrap; +`; diff --git a/packages/restapi/README.md b/packages/restapi/README.md index 7b29af123..5b8238f9c 100644 --- a/packages/restapi/README.md +++ b/packages/restapi/README.md @@ -9,96 +9,96 @@ This package gives access to Push Protocol (Push Nodes) APIs. Visit [Developer D - [How to use in your app?](#how-to-use-in-your-app) - [Installation](#installation) - [Import SDK](#import-sdk) - - [About generating the "signer" object for different platforms](#about-generating-the-signer-object-for-different-platforms) + - [**About generating the "signer" object for different platforms**](#about-generating-the-signer-object-for-different-platforms) - [When using in SERVER-SIDE code:](#when-using-in-server-side-code) - [When using in FRONT-END code:](#when-using-in-front-end-code) - - [About blockchain agnostic address format](#about-blockchain-agnostic-address-format) + - [**About blockchain agnostic address format**](#about-blockchain-agnostic-address-format) - [Chat blockchain agnostic address format](#chat-blockchain-agnostic-address-format) - - [About Push contract addresses](#about-push-contract-addresses) + - [**About Push contract addresses**](#about-push-contract-addresses) - [Push core contract address](#push-core-contract-address) - [Push communicator contract address](#push-communicator-contract-address) - [SDK Features](#sdk-features) - [For Notification](#for-notification) - - [Fetching user notifications](#fetching-user-notifications) - - [Fetching user spam notifications](#fetching-user-spam-notifications) - - [Fetching user subscriptions](#fetching-user-subscriptions) - - [Fetching channel details](#fetching-channel-details) - - [Searching for channel(s)](#searching-for-channels) - - [Opt in to a channel](#opt-in-to-a-channel) - - [Opt out to a channel](#opt-out-to-a-channel) - - [Sending notification](#sending-notification) - - [Direct payload for single recipient(target)](#direct-payload-for-single-recipienttarget) - - [Direct payload for group of recipients(subset)](#direct-payload-for-group-of-recipientssubset) - - [Direct payload for all recipients(broadcast)](#direct-payload-for-all-recipientsbroadcast) - - [IPFS payload for single recipient(target)](#ipfs-payload-for-single-recipienttarget) - - [IPFS payload for group of recipients(subset)](#ipfs-payload-for-group-of-recipientssubset) - - [IPFS payload for all recipients(broadcast)](#ipfs-payload-for-all-recipientsbroadcast) - - [Minimal payload for single recipient(target)](#minimal-payload-for-single-recipienttarget) - - [Minimal payload for a group of recipient(subset)](#minimal-payload-for-a-group-of-recipientsubset) - - [Minimal payload for all recipients(broadcast)](#minimal-payload-for-all-recipientsbroadcast) - - [Graph payload for single recipient(target)](#graph-payload-for-single-recipienttarget) - - [Graph payload for group of recipients(subset)](#graph-payload-for-group-of-recipientssubset) - - [Graph payload for all recipients(broadcast)](#graph-payload-for-all-recipientsbroadcast) + - [**Fetching user notifications**](#fetching-user-notifications) + - [**Fetching user spam notifications**](#fetching-user-spam-notifications) + - [**Fetching user subscriptions**](#fetching-user-subscriptions) + - [**Fetching channel details**](#fetching-channel-details) + - [**Searching for channel(s)**](#searching-for-channels) + - [**Opt in to a channel**](#opt-in-to-a-channel) + - [**Opt out to a channel**](#opt-out-to-a-channel) + - [**Sending notification**](#sending-notification) + - [**Direct payload for single recipient(target)**](#direct-payload-for-single-recipienttarget) + - [**Direct payload for group of recipients(subset)**](#direct-payload-for-group-of-recipientssubset) + - [**Direct payload for all recipients(broadcast)**](#direct-payload-for-all-recipientsbroadcast) + - [**IPFS payload for single recipient(target)**](#ipfs-payload-for-single-recipienttarget) + - [**IPFS payload for group of recipients(subset)**](#ipfs-payload-for-group-of-recipientssubset) + - [**IPFS payload for all recipients(broadcast)**](#ipfs-payload-for-all-recipientsbroadcast) + - [**Minimal payload for single recipient(target)**](#minimal-payload-for-single-recipienttarget) + - [**Minimal payload for a group of recipient(subset)**](#minimal-payload-for-a-group-of-recipientsubset) + - [**Minimal payload for all recipients(broadcast)**](#minimal-payload-for-all-recipientsbroadcast) + - [**Graph payload for single recipient(target)**](#graph-payload-for-single-recipienttarget) + - [**Graph payload for group of recipients(subset)**](#graph-payload-for-group-of-recipientssubset) + - [**Graph payload for all recipients(broadcast)**](#graph-payload-for-all-recipientsbroadcast) - [Notification Helper Utils](#notification-helper-utils) - - [Parsing notifications](#parsing-notifications) + - [**Parsing notifications**](#parsing-notifications) - [Advanced Notifications (WIP)](#advanced-notifications-wip) - [DEPRECATED](#deprecated) - - [Get a channel's subscriber list of addresses](#get-a-channels-subscriber-list-of-addresses) + - [**Get a channel's subscriber list of addresses**](#get-a-channels-subscriber-list-of-addresses) - [For Chat](#for-chat) - - [Create user for chat](#create-user-for-chat) - - [Get user data for chat](#get-user-data-for-chat) - - [Decrypting encrypted pgp private key from user data](#decrypting-encrypted-pgp-private-key-from-user-data) - - [Updating chat user profile](#updating-user-profile) - - [Fetching list of user chats](#fetching-list-of-user-chats) - - [Fetching list of user chat requests](#fetching-list-of-user-chat-requests) - - [Fetching conversation hash between two users](#fetching-conversation-hash-between-two-users) - - [Fetching latest chat between two users](#fetching-latest-chat-between-two-users) - - [Fetching chat history between two users](#fetching-chat-history-between-two-users) - - [To send a message](#to-send-a-message) - - [To approve a chat request](#to-approve-a-chat-request) - - [To create a group](#to-create-a-group) - - [To create a token gated group](#to-create-a-token-gated-group) - - [To update group details](#to-update-group-details) - - [To update token gated group details](#to-update-token-gated-group-details) - - [To get group details by group name](#to-get-group-details-by-group-name) - - [To get group details by chatId](#to-get-group-details-by-chatid) - - [Chat Helper Utils](#chat-helper-utils) - - [Decrypting messages](#decrypting-messages) + - [**Create user for chat**](#create-user-for-chat) + - [**Get user data for chat**](#get-user-data-for-chat) + - [**Decrypting encrypted pgp private key from user data**](#decrypting-encrypted-pgp-private-key-from-user-data) + - [**Updating User Profile**](#updating-user-profile) + - [**Fetching list of user chats**](#fetching-list-of-user-chats) + - [**Fetching list of user chat requests**](#fetching-list-of-user-chat-requests) + - [**Fetching conversation hash between two users**](#fetching-conversation-hash-between-two-users) + - [**Fetching latest chat between two users**](#fetching-latest-chat-between-two-users) + - [**Fetching chat history between two users**](#fetching-chat-history-between-two-users) + - [**To send a message**](#to-send-a-message) + - [**To approve a chat request**](#to-approve-a-chat-request) + - [**To create a group**](#to-create-a-group) + - [**To create a token gated group**](#to-create-a-token-gated-group) + - [**To update group details**](#to-update-group-details) + - [**To update token gated group details**](#to-update-token-gated-group-details) + - [**To get group details by group name**](#to-get-group-details-by-group-name) + - [**To get group details by chatId**](#to-get-group-details-by-chatid) + - [**Chat Helper Utils**](#chat-helper-utils) + - [**Decrypting messages**](#decrypting-messages) - [For Video](#for-video) - - [Instance Variables](#instance-variables) - - [peerInstance](#peerinstance) - - [signer](#signer) - - [chainId](#chainid) - - [pgpPrivateKey](#pgpprivatekey) - - [env](#env) - - [data](#data) - - [setData](#setdata) - - [Methods](#methods) - - [constructor](#constructor) - - [create](#create) - - [request](#request) - - [acceptRequest](#acceptrequest) - - [connect](#connect) - - [disconnect](#disconnect) - - [enableVideo](#enablevideo) - - [enableAudio](#enableaudio) - - [isInitiator](#isinitiator) + - [**Instance Variables**](#instance-variables) + - [**peerInstance**](#peerinstance) + - [**signer**](#signer) + - [**chainId**](#chainid) + - [**pgpPrivateKey**](#pgpprivatekey) + - [**env**](#env) + - [**data**](#data) + - [**setData**](#setdata) + - [**Methods**](#methods) + - [**constructor**](#constructor) + - [**create**](#create) + - [**request**](#request) + - [**acceptRequest**](#acceptrequest) + - [**connect**](#connect) + - [**disconnect**](#disconnect) + - [**enableVideo**](#enablevideo) + - [**enableAudio**](#enableaudio) + - [**isInitiator**](#isinitiator) - [For Spaces](#for-spaces) - - [To create a space](#to-create-a-space) - - [To create a token gated space](#to-create-a-token-gated-space) - - [To update space details](#to-update-space-details) - - [To update token gated space details](#to-update-token-gated-space-details) - - [To get space details by spaceId](#to-get-space-details-by-spaceId) - - [To start a space](#to-start-a-space) - - [To stop a space](#to-stop-a-space) - - [To approve a space request](#to-approve-a-space-request) - - [To add listeners to space](#to-add-listeners-to-space) - - [To remove listeners from space](#to-remove-listeners-from-space) - - [To add speakers to space](#to-add-speakers-to-space) - - [To remove speakers from space](#to-remove-speakers-from-space) - - [Fetching list of user spaces](#fetching-list-of-user-spaces) - - [Fetching list of user space requests](#fetching-list-of-user-space-requests) - - [Fetching list of trending spaces](#fetching-list-of-trending-spaces) + - [**To create a space**](#to-create-a-space) + - [**To create a token gated space**](#to-create-a-token-gated-space) + - [**To update space details**](#to-update-space-details) + - [**To update token gated space details**](#to-update-token-gated-space-details) + - [**To get space details by spaceId**](#to-get-space-details-by-spaceid) + - [**To start a space**](#to-start-a-space) + - [**To stop a space**](#to-stop-a-space) + - [**To approve a space request**](#to-approve-a-space-request) + - [**To add listeners to space**](#to-add-listeners-to-space) + - [**To remove listeners from space**](#to-remove-listeners-from-space) + - [**To add speakers to space**](#to-add-speakers-to-space) + - [**To remove speakers from space**](#to-remove-speakers-from-space) + - [**Fetching list of user spaces**](#fetching-list-of-user-spaces) + - [**Fetching list of user space requests**](#fetching-list-of-user-space-requests) + - [**Fetching list of trending spaces**](#fetching-list-of-trending-spaces) # How to use in your app? @@ -4198,9 +4198,9 @@ const pgpDecryptedPvtKey = await PushAPI.chat.decryptPGPKey(encryptedPGPPrivateK const response = await PushAPI.space.create({ spaceName:'wasteful_indigo_warbler', spaceDescription: 'boring_emerald_gamefowl', - members: ['0x9e60c47edF21fa5e5Af33347680B3971F2FfD464','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + listeners: ['0x9e60c47edF21fa5e5Af33347680B3971F2FfD464','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], spaceImage: <space image link> , - admins: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + speakers: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], isPublic: true, account: '0xD993eb61B8843439A23741C0A3b5138763aE11a4', env: 'staging', @@ -4224,9 +4224,9 @@ const pgpDecryptedPvtKey = await PushAPI.chat.decryptPGPKey(encryptedPGPPrivateK const response = await PushAPI.space.create({ spaceName:'wasteful_indigo_warbler', spaceDescription: 'boring_emerald_gamefowl', - members: ['0x9e60c47edF21fa5e5Af33347680B3971F2FfD464','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + listeners: ['0x9e60c47edF21fa5e5Af33347680B3971F2FfD464','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], spaceImage: <space image link> , - admins: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + speakers: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], contractAddressERC20: "0x8Afa8FDf9fB545C8412499E8532C958086608b30", numberOfERC20: 20, contractAddressNFT: "0x42af3147f17239341477113484752D5D3dda997B", @@ -4247,8 +4247,8 @@ Allowed Options (params with _ are mandatory) | spaceName* | string | - | group name | | spaceDescription* | string | - | group description | | spaceImage* | string | - | group image link | -| members* | Array | - | wallet addresses of all members except admins and spaceCreator | -| admins* | Array | - | wallet addresses of all admins except members and spaceCreator | +| listeners* | Array | - | wallet addresses of all listeners except speakers and spaceCreator | +| speakers* | Array | - | wallet addresses of all speakers except listeners and spaceCreator | | isPublic* | boolean | - | true for public space, false for private space | | scheduleAt\* | Date | - | Date time when the space is scheduled to start | | scheduleEnd | Date | - | Date time when the space is scheduled to end | @@ -4364,9 +4364,9 @@ const response = await PushAPI.space.update({ spaceId: 'spaces:e0553610da88dacac70b406d1222a6881c0bde2c5129e58b526b5ae729d82116', spaceName: 'Push Space 3', spaceDescription: 'This is the oficial space for Push Protocol', - members: ['0x2e60c47edF21fa5e5A333347680B3971F1FfD456','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + listeners: ['0x2e60c47edF21fa5e5A333347680B3971F1FfD456','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], spaceImage: <group image link> , - admins: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + speakers: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], scheduleAt: '2023-07-15T14:48:00.000Z', scheduleEnd: '2023-07-15T15:48:00.000Z', status: PushAPI.ChatStatus.PENDING, @@ -4393,9 +4393,9 @@ const response = await PushAPI.space.update({ spaceId: 'spaces:e0553610da88dacac70b406d1222a6881c0bde2c5129e58b526b5ae729d82116', spaceName: 'Push Space 3', spaceDescription: 'This is the oficial space for Push Protocol', - members: ['0x2e60c47edF21fa5e5A333347680B3971F1FfD456','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + listeners: ['0x2e60c47edF21fa5e5A333347680B3971F1FfD456','0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], spaceImage: <group image link> , - admins: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], + speakers: ['0x3829E53A15856d1846e1b52d3Bdf5839705c29e5'], scheduleAt: '2023-07-15T14:48:00.000Z', scheduleEnd: '2023-07-15T15:48:00.000Z', status: PushAPI.ChatStatus.PENDING, @@ -4418,8 +4418,8 @@ Allowed Options (params with _ are mandatory) | spaceDescription* | string | - | space description | | spaceImage* | string | - | space image | | status* | string | - | space status - 'ACTIVE', 'PENDING', 'ENDED' | -| members* | Array | - | wallet addresses of all members except admins and spaceCreator | -| admins* | Array | - | wallet addresses of all admins except members and spaceCreator | +| listeners* | Array | - | wallet addresses of all listeners except speakers and spaceCreator | +| speakers* | Array | - | wallet addresses of all speakers except listeners and spaceCreator | | scheduleAt* | Date | - | Date time when the space is scheduled to start | | scheduleEnd | Date | - | Date time when the space is scheduled to end | | contractAddressERC20 | string | null | ERC20 Contract Address | diff --git a/packages/restapi/src/lib/chat/addMembers.ts b/packages/restapi/src/lib/chat/addMembers.ts index cbec53f3b..0b5d07ba5 100644 --- a/packages/restapi/src/lib/chat/addMembers.ts +++ b/packages/restapi/src/lib/chat/addMembers.ts @@ -2,7 +2,6 @@ import { isValidETHAddress, walletToPCAIP10 } from '../helpers'; import Constants from '../constants'; import { EnvOptionsType, SignerType, GroupDTO } from '../types'; import { - getWallet, getMembersList, getAdminsList } from './helpers'; @@ -49,8 +48,6 @@ export const addMembers = async ( } }); - const wallet = getWallet({ account, signer }); - const group = await getGroup({ chatId: chatId, env, diff --git a/packages/restapi/src/lib/space/create.ts b/packages/restapi/src/lib/space/create.ts index 899bfbe67..3a76b5d22 100644 --- a/packages/restapi/src/lib/space/create.ts +++ b/packages/restapi/src/lib/space/create.ts @@ -7,9 +7,9 @@ export interface ChatCreateSpaceType extends EnvOptionsType { signer: SignerType; spaceName: string; spaceDescription: string; - members: Array; + listeners: Array; spaceImage: string | null; - admins: Array; + speakers: Array; isPublic: boolean; contractAddressNFT?: string; numberOfNFTs?: number; @@ -26,9 +26,9 @@ export async function create(options: ChatCreateSpaceType): Promise { signer, spaceName, spaceDescription, - members, + listeners, spaceImage, - admins, + speakers, isPublic, contractAddressNFT, numberOfNFTs, @@ -46,9 +46,9 @@ export async function create(options: ChatCreateSpaceType): Promise { signer, groupName: spaceName, groupDescription: spaceDescription, - members: members, + members: listeners, groupImage: spaceImage, - admins: admins, + admins: speakers, isPublic: isPublic, contractAddressNFT: contractAddressNFT, numberOfNFTs: numberOfNFTs, diff --git a/packages/restapi/src/lib/space/leave.ts b/packages/restapi/src/lib/space/leave.ts index 53b85d56e..12121a86c 100644 --- a/packages/restapi/src/lib/space/leave.ts +++ b/packages/restapi/src/lib/space/leave.ts @@ -1,11 +1,3 @@ -import { - groupDtoToSpaceDto, - getMembersList, - getAdminsList, -} from '../chat/helpers'; -import { updateGroup } from '../chat/updateGroup'; -import { get } from './get'; - import type Space from './Space'; import { SPACE_DISCONNECT_TYPE } from '../payloads/constants'; diff --git a/packages/restapi/src/lib/space/start.ts b/packages/restapi/src/lib/space/start.ts index fd518678b..f15f28449 100644 --- a/packages/restapi/src/lib/space/start.ts +++ b/packages/restapi/src/lib/space/start.ts @@ -18,7 +18,6 @@ export interface StartSpaceType extends EnvOptionsType { } import type Space from './Space'; -import { SPACE_REQUEST_TYPE } from '../payloads/constants'; import { produce } from 'immer'; type StartType = { diff --git a/packages/restapi/src/lib/space/update_out.ts b/packages/restapi/src/lib/space/update_out.ts index 66e6e6f7a..bbc7199da 100644 --- a/packages/restapi/src/lib/space/update_out.ts +++ b/packages/restapi/src/lib/space/update_out.ts @@ -10,8 +10,8 @@ export interface ChatUpdateSpaceType extends EnvOptionsType { spaceName: string; spaceImage: string | null; spaceDescription: string; - members: Array; - admins: Array; + listeners: Array; + speakers: Array; pgpPrivateKey?: string; scheduleAt: Date; scheduleEnd?: Date | null; @@ -26,8 +26,8 @@ export const update = async ( spaceName, spaceImage, spaceDescription, - members, - admins, + listeners, + speakers, signer, env = Constants.ENV.PROD, pgpPrivateKey = null, @@ -54,8 +54,8 @@ export const update = async ( groupName: spaceName, groupImage: spaceImage, groupDescription: spaceDescription, - members: members, - admins: admins, + members: listeners, + admins: speakers, signer: signer, env: env, pgpPrivateKey: pgpPrivateKey, diff --git a/packages/uiweb/src/lib/components/space/SpaceWidget/ScheduledWidgetContent.tsx b/packages/uiweb/src/lib/components/space/SpaceWidget/ScheduledWidgetContent.tsx index 8695b7cca..90d3943d2 100644 --- a/packages/uiweb/src/lib/components/space/SpaceWidget/ScheduledWidgetContent.tsx +++ b/packages/uiweb/src/lib/components/space/SpaceWidget/ScheduledWidgetContent.tsx @@ -110,7 +110,7 @@ export const ScheduledWidgetContent: React.FC = ({ const getShareOptionDetails = (shareOption: ShareOptionsValues) => { let icon = ''; let alt = ''; - + switch (shareOption) { case ShareOptions.Twitter: icon = TwitterIcon; @@ -125,7 +125,7 @@ export const ScheduledWidgetContent: React.FC = ({ alt = 'Copy Icon'; break; } - + return { icon, alt }; }; @@ -225,7 +225,7 @@ export const ScheduledWidgetContent: React.FC = ({ handleShareAction(shareOption)} > -