NB: Requires the corresponding madon PR to be applied first since this relies on madon as a library
Pleroma/Akkoma and GotoSocial use opaque IDs rather than int64s like Mastodon which means that madon can't talk to either of those.
This commit updates everything that can be an ID to madon.ActivityID which is an alias for string - can't create a specific type for it since there's more than a few places where they're concatenated directly to strings for URLs, etc. Which means it could just as easily be a direct string type itself but I find that having distinct types can often make the code more readable and understandable.
One extra bit is that statusOpts has grown a _hasReplyTo boolean to indicate whether the --in-reply-to flag was given or not because we can't distinguish because "empty because default" or "empty because given and empty". Another way around this would be to set the default to some theoretically impossible or unlikely string but you never know when someone might spin up an instance where, e.g., admin posts have negative integer IDs.
NB: Requires the corresponding
madon
PR to be applied first since this relies onmadon
as a libraryPleroma/Akkoma and GotoSocial use opaque IDs rather than
int64
s like Mastodon which means thatmadon
can't talk to either of those.This commit updates everything that can be an ID to
madon.ActivityID
which is an alias forstring
- can't create a specific type for it since there's more than a few places where they're concatenated directly to strings for URLs, etc. Which means it could just as easily be a directstring
type itself but I find that having distinct types can often make the code more readable and understandable.One extra bit is that
statusOpts
has grown a_hasReplyTo
boolean to indicate whether the--in-reply-to
flag was given or not because we can't distinguish because "empty because default" or "empty because given and empty". Another way around this would be to set the default to some theoretically impossible or unlikely string but you never know when someone might spin up an instance where, e.g., admin posts have negative integer IDs.