-
-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: fixed duplication of chats (#3360)
* fixed duplication of chats * removed istanbul ignore text * added error handling * added tests for createdirectchat.tsx
- Loading branch information
Showing
6 changed files
with
342 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...serPortal/CreateDirectChat/CreateDirectChat/functions/handleCreateDirectChat.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[Admin Docs](/) | ||
|
||
*** | ||
|
||
# Function: handleCreateDirectChat() | ||
|
||
> **handleCreateDirectChat**(`id`, `chats`, `t`, `createChat`, `organizationId`, `userId`, `chatsListRefetch`, `toggleCreateDirectChatModal`): `Promise`\<`void`\> | ||
Defined in: [src/components/UserPortal/CreateDirectChat/CreateDirectChat.tsx:70](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/UserPortal/CreateDirectChat/CreateDirectChat.tsx#L70) | ||
|
||
## Parameters | ||
|
||
### id | ||
|
||
`string` | ||
|
||
### chats | ||
|
||
[`Chat`](../../../../../screens/UserPortal/Chat/Chat/type-aliases/Chat.md)[] | ||
|
||
### t | ||
|
||
`TFunction`\<`"userChat"`\> | ||
|
||
### createChat | ||
|
||
(`options`?) => `Promise`\<`FetchResult`\<`unknown`\>\>(`arg0`) => `unknown` | ||
|
||
### organizationId | ||
|
||
`string` | ||
|
||
### userId | ||
|
||
`string` | ||
|
||
### chatsListRefetch | ||
|
||
(`variables`?) => `Promise`\<`ApolloQueryResult`\<`unknown`\>\>() => `Promise`\<`ApolloQueryResult`\<`unknown`\>\> | ||
|
||
### toggleCreateDirectChatModal | ||
|
||
() => `void`() => `void` | ||
|
||
## Returns | ||
|
||
`Promise`\<`void`\> |
39 changes: 39 additions & 0 deletions
39
docs/docs/auto-docs/screens/UserPortal/Chat/Chat/type-aliases/Chat.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[Admin Docs](/) | ||
|
||
*** | ||
|
||
# Type Alias: Chat | ||
|
||
> **Chat**: `object` | ||
Defined in: [src/screens/UserPortal/Chat/Chat.tsx:87](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/UserPortal/Chat/Chat.tsx#L87) | ||
|
||
## Type declaration | ||
|
||
### \_id | ||
|
||
> **\_id**: `string` | ||
### image | ||
|
||
> **image**: `string` | ||
### isGroup | ||
|
||
> **isGroup**: `boolean` | ||
### messages | ||
|
||
> **messages**: `DirectMessage`[] | ||
### name | ||
|
||
> **name**: `string` | ||
### unseenMessagesByUsers | ||
|
||
> **unseenMessagesByUsers**: `string` | ||
### users | ||
|
||
> **users**: `object`[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.