Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join group option #687

Merged
merged 101 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
51348e1
feat: created architechture
mishramonalisha76 Aug 2, 2023
ec9485f
fix: added context values (#594)
mishramonalisha76 Aug 2, 2023
5a3c3c9
Chat dataprovider (#596)
KlausMikhaelson Aug 2, 2023
ce78524
fix: added test page for chat ui components (#597)
mishramonalisha76 Aug 2, 2023
ef37fb9
added chatbubble component (#602)
KlausMikhaelson Aug 3, 2023
a9c0a25
fix: added theme
mishramonalisha76 Aug 3, 2023
0f7f1b3
Group chat bubble (#604)
KlausMikhaelson Aug 7, 2023
eb71bbc
feat: adding pfp in text bubbles
KlausMikhaelson Aug 8, 2023
59d034c
fix: replaced hook with function and added pfp to messagebubble
KlausMikhaelson Aug 8, 2023
e85ba71
fix: fixed image alignment
KlausMikhaelson Aug 8, 2023
bba5642
fix: changed border-radius of msg bubble and changed function name
KlausMikhaelson Aug 8, 2023
120a52d
fix: fixed theme and decryptedPrivateKey name (#616)
mishramonalisha76 Aug 8, 2023
90c4421
Merge pull request #617 from ethereum-push-notification-service/pfp-c…
KlausMikhaelson Aug 8, 2023
ad8459c
Message list (#615)
mishramonalisha76 Aug 8, 2023
b374b0a
fix: added theme in msgbubble (#620)
KlausMikhaelson Aug 9, 2023
a9a979e
fix: exported the theme (#623)
KlausMikhaelson Aug 9, 2023
a0d7c18
fix: fixed merge conflicts
mishramonalisha76 Aug 10, 2023
4b1ea94
Typebar component (#631)
KlausMikhaelson Aug 11, 2023
4193fd6
feat: added connectbutton
KlausMikhaelson Aug 13, 2023
bacce52
fix: fixed connectbtn ui and remove disconnect and fixed error on dis…
KlausMikhaelson Aug 15, 2023
fc922c7
fix: fixed create account getting called twice
KlausMikhaelson Aug 15, 2023
81612d6
Merge pull request #637 from ethereum-push-notification-service/conne…
KlausMikhaelson Aug 15, 2023
b21bdb1
Profile Header Component (#636)
corlard3y Aug 16, 2023
f0b313c
Message container (#635)
mishramonalisha76 Aug 16, 2023
4936657
fix: updated svg to react component
0xNilesh Aug 16, 2023
b793e09
fix: changed svg to tsx component
KlausMikhaelson Aug 16, 2023
42ca5c9
refactor: merge conflicts
0xNilesh Aug 16, 2023
2862dc7
fix: fixed review changes (#646)
mishramonalisha76 Aug 17, 2023
4b5e41b
fix: merged with main
mishramonalisha76 Aug 17, 2023
933a361
Profile Header -> Chat Profile fixes (#647)
corlard3y Aug 17, 2023
77e17f4
fix: resolved package not added issue
0xNilesh Aug 17, 2023
39c7fe2
Fix: modal issue in group info && alert remove members (#653)
corlard3y Aug 17, 2023
5a577c6
fix: QA fixes (#654)
corlard3y Aug 17, 2023
c4a2013
refactor: resolved merge conflicts
0xNilesh Aug 18, 2023
a40f2ad
fix: fixed typebar space not working and theme
KlausMikhaelson Aug 20, 2023
b5af063
feat: created access control UI
KlausMikhaelson Aug 21, 2023
ff762c4
fix: fixed main
mishramonalisha76 Aug 21, 2023
2f7cf5e
feat: created verify access control hook
KlausMikhaelson Aug 21, 2023
0ecfc0d
Connect btn revamp (#668)
mishramonalisha76 Aug 21, 2023
5002946
Typebar UI issue (#666)
mishramonalisha76 Aug 21, 2023
5ddc742
fix: removed merge conflict
KlausMikhaelson Aug 21, 2023
9a32df6
fix: fixed theme colours
mishramonalisha76 Aug 21, 2023
fbb3593
fix: merged
mishramonalisha76 Aug 21, 2023
8458d92
fix: added theme for brb
mishramonalisha76 Aug 21, 2023
0069912
fix: fixed access control hook issue
KlausMikhaelson Aug 22, 2023
5ff4b6a
feat: added access control verification
KlausMikhaelson Aug 22, 2023
124b93b
feat: added onclick props for integration team to pass function and f…
KlausMikhaelson Aug 22, 2023
e52e66e
fix: added link for learn more
KlausMikhaelson Aug 22, 2023
f35b5ad
fix: fixed msg not updating in socket issue
KlausMikhaelson Aug 22, 2023
09f9720
fix: added filter hat
mishramonalisha76 Aug 23, 2023
d6d4228
fix: merged with main
mishramonalisha76 Aug 23, 2023
d8fae67
fix: merged with main
mishramonalisha76 Aug 23, 2023
79aa54e
fix: added msg filter
mishramonalisha76 Aug 23, 2023
4a23c82
fix: fixed msg border
mishramonalisha76 Aug 23, 2023
9dc04d9
fix: fixed theme
mishramonalisha76 Aug 23, 2023
19b0dde
fix: fixed fonts
mishramonalisha76 Aug 23, 2023
9d624ec
fix: fixed bug
mishramonalisha76 Aug 23, 2023
5e68ed5
Access control (#672)
KlausMikhaelson Aug 23, 2023
2d51492
fix: fixed padding issues
mishramonalisha76 Aug 23, 2023
b06b8be
fix: merged
mishramonalisha76 Aug 23, 2023
108213c
fix(f): fixed build issues
mishramonalisha76 Aug 23, 2023
7bd809c
fix: fix for chat status test
mishramonalisha76 Aug 23, 2023
b967e7c
feat: added verification option to show only on token gated groups
KlausMikhaelson Aug 23, 2023
1a3f6bc
fix: fixing group access control
KlausMikhaelson Aug 23, 2023
87ed961
fix: merged conflict
KlausMikhaelson Aug 23, 2023
a349ae4
fix: fixed access control
KlausMikhaelson Aug 23, 2023
5375224
Check rules access control (#678)
KlausMikhaelson Aug 23, 2023
f199cc0
fix: fixed build
mishramonalisha76 Aug 23, 2023
064f01d
fix: fixed merge conflicts
mishramonalisha76 Aug 23, 2023
4ad7c4d
feat: added send request to join group
KlausMikhaelson Aug 24, 2023
ae183eb
Merge branch 'feat/chat-components' into join-group-option
KlausMikhaelson Aug 24, 2023
e63777f
fix: fixed verification on send
mishramonalisha76 Aug 24, 2023
6e0639f
fix: fixed verify access btn not showing after joining group
KlausMikhaelson Aug 24, 2023
40741fa
fix: fixed join group showing for members too
KlausMikhaelson Aug 24, 2023
0b701f6
fix: fixed join group showing to members
KlausMikhaelson Aug 24, 2023
fafdc99
667 chat.send enhancement (#673)
Aman035 Aug 24, 2023
c724ba1
fix: fixed intent issues
mishramonalisha76 Aug 24, 2023
cbfc4e0
fix: removed console log fixed approve
mishramonalisha76 Aug 24, 2023
78a1177
680 group rules cosmetic changes (#682)
mohammeds1992 Aug 24, 2023
2d9b2fa
fix: fixed
mishramonalisha76 Aug 24, 2023
1b6aa8b
fix: fixed minor issues
mishramonalisha76 Aug 24, 2023
640b0d7
fix: fixed minor issues
mishramonalisha76 Aug 24, 2023
40d6cf3
fix: fixe dissue
mishramonalisha76 Aug 24, 2023
82a4217
fix: fixed scroll
mishramonalisha76 Aug 24, 2023
c181974
fix: fixed minor issues
mishramonalisha76 Aug 24, 2023
cb71999
fix: check for scroll
mishramonalisha76 Aug 24, 2023
a94a1fe
fix: fixed scrolling
mishramonalisha76 Aug 24, 2023
9fa7bb1
fix: fixed theme
mishramonalisha76 Aug 25, 2023
6ac1681
fix: fixed
mishramonalisha76 Aug 25, 2023
c514587
fix: fixed
mishramonalisha76 Aug 25, 2023
231207d
fix: fixed
mishramonalisha76 Aug 25, 2023
8ad371d
fix: fixed issues
mishramonalisha76 Aug 25, 2023
0fec866
fix: fixed
mishramonalisha76 Aug 25, 2023
5e8d4a2
feat: added toast in join group btn for pvt groups
KlausMikhaelson Aug 25, 2023
dec3764
fix: fixed blurr
mishramonalisha76 Aug 25, 2023
3400d49
fix: merged with main
mishramonalisha76 Aug 25, 2023
f7412e0
fix: merged with alpha
mishramonalisha76 Aug 25, 2023
61453dc
fix: fixed minor issues rules
mishramonalisha76 Aug 25, 2023
dbe4afa
fix: fixed
mishramonalisha76 Aug 25, 2023
627e03e
fix: fixed
mishramonalisha76 Aug 25, 2023
86f2927
fix: fixed
mishramonalisha76 Aug 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const ChatViewComponentTest = () => {
{/* <Loader show={isLoading} /> */}
<ChatViewComponentCard>

<ChatViewComponent onClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='c2d544ad9d1efd5c5a593b143bf8232875c926cf28015564e70ad078b95f807e' limit={10}/>
<ChatViewComponent onClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='24b029b8e07e60291bf9d8c0c48ff993fa1e0a99105459f7404c425c92e91bac' limit={10}/>
</ChatViewComponentCard>
</div>
);
};
}

export default ChatViewComponentTest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const MessageCard = ({
margin="5px 0"
alignSelf={position ? 'end' : 'start'}
justifyContent="start"
maxWidth="80%"
maxWidth="86%"
minWidth="71px"
position="relative"
width="fit-content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,13 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
}, [messagesSinceLastConnection]);

const scrollToBottom = (behavior?: string | null) => {
if (listInnerRef.current) {
listInnerRef.current.scrollTop = listInnerRef.current.scrollHeight;
}
setTimeout(()=>{
if (listInnerRef.current) {
listInnerRef.current.scrollTop = listInnerRef.current.scrollHeight +100000;
console.log(listInnerRef.current.scrollHeight +100000)
}
},0)

};

useEffect(()=>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const MessageInput: React.FC<MessageInputProps> = ({
chatId: chatFeed?.groupInformation?.groupCreator || '',
messageType: 'Text',
});
if(sendTextMessage) {
if (sendTextMessage) {
statusToast.showMessageToast({
toastTitle: 'Success',
toastMessage: 'Request sent successfully',
Expand Down Expand Up @@ -240,7 +240,11 @@ export const MessageInput: React.FC<MessageInputProps> = ({
chatId,
messageType: type as any,
});
if (sendMessageResponse&&sendMessageResponse.includes('400')) {
if (
sendMessageResponse &&
typeof sendMessageResponse === 'string' &&
sendMessageResponse.includes('400')
) {
setAccessControl(chatId, true);
setVerified(false);
setVerificationSuccessfull(false);
Expand Down Expand Up @@ -289,23 +293,23 @@ export const MessageInput: React.FC<MessageInputProps> = ({
if (Object.keys(chat || {}).length) {
setChatFeed(chat as IFeeds);
}
}
};

useEffect(() => {
(async () => {
if (
Object.keys(acceptedRequestMessage || {}).length &&
Object.keys(chatFeed || {}).length
) {
await updateChatFeed();
await updateChatFeed();
}
})();
}, [acceptedRequestMessage]);

useEffect(() => {
(async () => {
if (!account && !env) return;
if(account && env){
if (account && env) {
const chat = await fetchChat({ chatId });
if (Object.keys(chat || {}).length) setChatFeed(chat as IFeeds);
else {
Expand All @@ -329,9 +333,6 @@ export const MessageInput: React.FC<MessageInputProps> = ({
}
}
}



})();
}, [chatId, pgpPrivateKey, account, env]);

Expand All @@ -347,7 +348,10 @@ export const MessageInput: React.FC<MessageInputProps> = ({
}
});

if (chatFeed?.groupInformation?.rules) {
if (chatFeed?.groupInformation?.rules &&
(chatFeed?.groupInformation?.rules?.groupAccess ||
chatFeed?.groupInformation?.rules?.chat)
) {
setIsRules(true);
}
};
Expand Down
7 changes: 4 additions & 3 deletions packages/uiweb/src/lib/hooks/chat/useApproveChatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface ApproveChatParams {
const useApproveChatRequest = () => {
const [error, setError] = useState<string>();
const [loading, setLoading] = useState<boolean>(false);
const { account, env,pgpPrivateKey } =useChatData();
const { account, env,pgpPrivateKey,signer } =useChatData();
const approveChatRequest = useCallback(async (options:ApproveChatParams) => {
const {

Expand All @@ -21,7 +21,8 @@ const useApproveChatRequest = () => {
const response = await PushAPI.chat.approve({
status: 'Approved',
account: account,
senderAddress: chatId, // receiver's address or chatId of a group
senderAddress: chatId,
signer:signer, // receiver's address or chatId of a group
pgpPrivateKey:pgpPrivateKey,
env: env,
});
Expand All @@ -34,7 +35,7 @@ const useApproveChatRequest = () => {
return;
}
},
[]
[account,env,signer]
);

return { approveChatRequest, error, loading };
Expand Down
2 changes: 1 addition & 1 deletion packages/uiweb/src/lib/hooks/chat/useFetchChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const useFetchChat = () => {
setLoading(false);
}
},
[pgpPrivateKey,env]
[pgpPrivateKey,env,account]
);

return { fetchChat, error, loading };
Expand Down