Skip to content

Commit 364e5cc

Browse files
committed
fix(Websocket): Fix an issue where the $conversation_id parameter is invalid
1 parent 820a4ba commit 364e5cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Apis/Message.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function sendText(string $user_id, string $data, string $category = 'CONT
4646
'id' => Uuid::uuid4()->toString(),
4747
'action' => 'CREATE_MESSAGE',
4848
'params' => [
49-
'conversation_id' => $category == 'CONTACT'
49+
'conversation_id' => $category == 'CONTACT' && empty($conversation_id)
5050
? $this->uniqueConversationId($user_id, $this->config['client_id'])
5151
: $conversation_id,
5252
'message_id' => Uuid::uuid4()->toString(),

src/Container.php

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* @method array createUser(string $fullName): array
3333
* @method array externalTransactions(string $asset = null, string $public_key = null, int $limit = null, string $offset = null, string $account_name = null): array
3434
* @method array createAttachments(): array
35+
* @method array createConversations(string $category, array $participants, string $conversation_id = null): array
3536
* @method array mixinNetworkChainsSyncStatus(): array
3637
* @method array topAsset(): array
3738
* @method array requestAccessToken(string $code): array

0 commit comments

Comments
 (0)