Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ef4f4e

Browse filesBrowse files
feature #59789 [Notifier] [Bluesky] Return the record CID as additional info (javiereguiluz)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [Notifier] [Bluesky] Return the record CID as additional info | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | - | License | MIT Some Bluesky API operations (like replies and quotes) require "strong references", which is the combination of the `uri` and the `cid` (See https://docs.bsky.app/docs/advanced-guides/posts#replies-quote-posts-and-embeds). After the changes made in #59742, we should also return the `cid` as additional info. Commits ------- 85a073e [Notifier] [Bluesky] Return the record CID as additional info
2 parents e93b82f + 85a073e commit 3ef4f4e
Copy full SHA for 3ef4f4e

File tree

4 files changed

+5
-2
lines changed
Filter options

4 files changed

+5
-2
lines changed

‎src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyTransport.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ protected function doSend(MessageInterface $message): SentMessage
124124

125125
if (200 === $statusCode) {
126126
$content = $response->toArray();
127-
$sentMessage = new SentMessage($message, (string) $this);
127+
128+
$sentMessage = new SentMessage($message, (string) $this, ['cid' => $content['cid']]);
128129
$sentMessage->setMessageId($content['uri']);
129130

130131
return $sentMessage;

‎src/Symfony/Component/Notifier/Bridge/Bluesky/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Bluesky/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add option to attach a website preview card
8+
* Add `cid` info into returned `SentMessage`
89

910
7.2
1011
---

‎src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ public function testReturnedMessageId()
338338
$message = $transport->send(new ChatMessage('Hello!'));
339339

340340
$this->assertSame($recordUri, $message->getMessageId());
341+
$this->assertSame($recordCid, $message->getInfo('cid'));
341342
}
342343

343344
public static function sendMessageWithEmbedDataProvider(): iterable

‎src/Symfony/Component/Notifier/Bridge/Bluesky/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Bluesky/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"psr/log": "^1|^2|^3",
2525
"symfony/clock": "^6.4|^7.0",
2626
"symfony/http-client": "^6.4|^7.0",
27-
"symfony/notifier": "^7.2",
27+
"symfony/notifier": "^7.3",
2828
"symfony/string": "^6.4|^7.0"
2929
},
3030
"require-dev": {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.