-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] [BlueSky] Change the value returned as the message ID #59742
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 click 8000 ing “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
Conversation
This snippet can be added to public function testUriIsSetAsMessageId()
{
$client = new MockHttpClient(function () {
return new JsonMockResponse([
'uri' => 'https://example.com',
'cid' => 'my_cid',
]);
});
$transport = self::createTransport($client);
$message = $transport->send(new ChatMessage('Hello!'));
$this->assertSame('https://example.com', $message->getMessageId());
} |
Alex, thanks a lot for creating the test for this 🙏 I only changed the values of the uri/cid to make them a bit more realistic because the BlueSky URI uses an uncommon format and it's better to test that too. Thanks. |
@@ -5,6 +5,7 @@ CHANGELOG | |||
--- | |||
|
|||
* Add option to attach a media | |||
* [BC Break] Change the returned message ID from record's 'cid' to 'uri' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be reverted as changelogs are auto-updated for bugfixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the main CHANGELOG. Here, we want to signify something unusual, I think it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me as well, but I think it's worth noticing that we had similar discussions in the past and the conclusion was it's either a bugfix or a BC break, not both.
87f8c45
to
4121f68
Compare
Thank you @javiereguiluz. |
…al 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
Some BlueSky API actions require both the
cid
and theuri
(see https://docs.bsky.app/docs/tutorials/like-repost) so we might re-add thecid
to SentMessage'sinfo
in Symfony 7.3.