Skip to content

Commit

Permalink
fix: Merge branch 'main' into deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Dec 26, 2023
2 parents a5b85a4 + 2ce025a commit af23f82
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ export const runNotificationClassUseCases = async (): Promise<void> => {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
console.log('PushAPI.channel.subscribers');
const channelSubscribers = await userAlice.channel.subscribers();
const channelSubscribers = await userAlice.channel.subscribers({
limit: 10,
page: 1,
});
if (showAPIResponse) {
console.log(channelSubscribers);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/sdk-backend-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@pushprotocol/restapi": "1.5.0",
"@pushprotocol/restapi": "1.5.1",
"@pushprotocol/socket": "^0.5.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export const ChatProfileTest = () => {
return (
<div>
<ChatProfile
// chatId='0x455E5AA18469bC6ccEF49594645666C587A3a71B'
chatId='81a077fbec5d64802a0feaeb26647250eb9a20894124c7bc1b2e044f360bf59f'
// chatId='36baf37e441fdd94e23406c6c716fc4e91a93a9ee68e070cd5b054534dbe09a6'
component={<div>Some component</div>}
chatId='0x455E5AA18469bC6ccEF49594645666C587A3a71B'
// chatId='36baf37e441fdd94e23406c6c716fc4e91a93a9ee68e070cd5b054534dbe09a6'
style="Info"
/>
/>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ChatViewComponentTest = () => {
<ChatView
onVerificationFail={() => console.log("BOIIII RETURNNNSSSSS")}
chatId='0xf8250D363BD1F25f52F10C21188fe82c68C049c4'

component={<div style={{height: "100px"}}><a href="https://github.com" target="_blank">Test</a></div>}
limit={10}
isConnected={true}
groupInfoModalBackground={MODAL_BACKGROUND_TYPE.OVERLAY}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
style,
groupInfoModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
component=null,
}) => {
const theme = useContext(ThemeContext);
const { account, env } = useChatData();
Expand Down Expand Up @@ -127,6 +128,11 @@ export const ChatProfile: React.FC<IChatProfile> = ({
margin="0 20px 0 auto"
alignSelf="center"
>
{(component && !groupInfo) && (
<Section cursor='pointer' maxHeight='1.75rem' width='1.75rem' maxWidth='1.75rem' minWidth='1.75rem'>
{component}
</Section>
)}
{(groupInfo?.rules?.chat?.conditions ||
groupInfo?.rules?.entry?.conditions) && <TokenGatedSvg />}
{!!groupInfo?.isPublic && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
verificationFailModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
verificationFailModalPosition = MODAL_POSITION_TYPE.GLOBAL,
component=null
} = options || {};

const { env, signer, account, pgpPrivateKey } = useChatData();
Expand All @@ -62,7 +63,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (
padding="13px"
theme={theme}
>
{chatProfile && <ChatProfile chatId={chatId} style="Info" groupInfoModalBackground={groupInfoModalBackground} groupInfoModalPositionType={groupInfoModalPositionType}/>}
{chatProfile && <ChatProfile component={component} chatId={chatId} style="Info" groupInfoModalBackground={groupInfoModalBackground} groupInfoModalPositionType={groupInfoModalPositionType}/>}
<Section
flex="1 1 auto"
overflow="hidden"
Expand Down
2 changes: 2 additions & 0 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ export interface IChatViewComponentProps {
verificationFailModalBackground?: ModalBackgroundType;
verificationFailModalPosition?: ModalPositionType;
onVerificationFail?: () => void;
component?: React.ReactNode;
}

export interface IChatProfile {
chatId: string;
style: "Info" | "Preview";
groupInfoModalBackground?: ModalBackgroundType;
groupInfoModalPositionType?: ModalPositionType;
component?: React.ReactNode;
}

export interface TwitterFeedReturnType {
Expand Down

0 comments on commit af23f82

Please sign in to comment.