Mastodon API: Status.pinned attribute not set #160
Labels
No labels
accessibility
documentation
backend
bug
discussion
duplicate
enhancement
frontend
has-dependencies
help wanted
invalid
meta
more info needed
needs-rebase
performance
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: iceshrimp/iceshrimp#160
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
According to the Mastodon docs,
Status.pinned
should betrue
if the post is pinned by the current user,false
if the post is not pinned but could be, and absent on all other posts (such as DMs, or posts created by another user). It looks like this is not implemented, andMisskey.noteWithDetails
inpackages/megalodon/src/misskey.ts
should be extended to include the pin status:true
the note is pinned (if it's in the Misskey user'spinnedNoteIds
orpinnedNotes
lists),false
if the note isn't pinned but could be, ornull
if the post is from a different user or otherwise not eligible for pinning.Impact: Mastodon API clients can't pin or unpin posts (since they rely on the presence and non-null-ness of
pinned
to identify pinned or eligible posts).This will require a bit more work, I think the best way to implement this is to add a
pinned
attribute to the/notes/state
and then aggregate the call with the isBookmarked function for the best performance.