There is no link field on notification. Is this by design or a bug? If it's by design can it be changes so it's included, I can't see how to build the URL with only a post id, and not know what type of post it is?
|
This is possible. Just use the format below:
This will work regardless of whether the post is a question or answer. If the post is an answer, the site will automatically redirect you to the URL for the answer. Example for this answer: http://stackapps.com/q/3550 |
|||||
|
|
Notifications typically contain links within their bodies. They're considerably more free-form than inbox_items, in that they're not typically attached to a post. Notifications only even have directly attached posts (at time of writing) in the bounty and edit cases. Note that if there's a post_id present, you can query /posts/{ids} to get a link. Alternatively, you can do as George suggested; those links aren't getting broken anytime soon. tl;dr - notifications wouldn't typically have links, but we'd have to do a lot of work just in case. The omission of |
|||
|