You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SentMessage created by the BlueSky notifier includes the cid as the "message ID". However, it'd be better to return the uri.
This is because you can't build the public URL of the post with the cid. In the URI, the did:plc:u5cwb2mwiv2bfq53cjufe6yn part is the $handle (unless you have a custom handle) and the 3k4duaz5vfs2b is the real $postId. So, the public URL is built as follows:
Should this be something to merge in 7.1? I mean this looks like something that could potentially break applications that already rely on this behavior. Maybe uri could be added to info of SentMessage in 7.3 making it fetchable with $message->getInfo('url').
Otherwise, this could be considered a minor BC break for 7.3. uri would become the message ID, and cid would be added to message's info to still provide the data if someone relies on it.
Should this be something to merge in 7.1? I mean this looks like something that could potentially break applications that already rely on this behavior. Maybe uri could be added to info of SentMessage in 7.3 making it fetchable with $message->getInfo('url').
…age ID (javiereguiluz)
This PR was squashed before being merged into the 7.2 branch.
Discussion
----------
[Notifier] [BlueSky] Change the value returned as the message ID
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | #59739
| License | MIT
Some BlueSky API actions require both the `cid` and the `uri` (see https://docs.bsky.app/docs/tutorials/like-repost) so we might re-add the `cid` to SentMessage's `info` in Symfony 7.3.
Commits
-------
4121f68 [Notifier] [BlueSky] Change the value returned as the message ID
Symfony version(s) affected
7.1.0
Description
When you post a message successfully on BlueSky, the response is a JSON structure like:
See https://docs.bsky.app/docs/advanced-guides/posts#post-record-structure
The
SentMessage
created by the BlueSky notifier includes thecid
as the "message ID". However, it'd be better to return theuri
.This is because you can't build the public URL of the post with the
cid
. In the URI, thedid:plc:u5cwb2mwiv2bfq53cjufe6yn
part is the$handle
(unless you have a custom handle) and the3k4duaz5vfs2b
is the real$postId
. So, the public URL is built as follows:Thanks!
How to reproduce
On symfony.com we use something like this to store the
$postId
from BlueSky:Later, we use that ID to build the URL and publish it as a link on Slack. This is generating wrong URLs and show 404 errors.
Possible Solution
Return the
uri
instead of thecid
as the message ID.Additional Context
No response
The text was updated successfully, but these errors were encountered: