thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Switch accounts at the post level

Open hiramfromthechi opened this issue 2 years ago • 7 comments

Is your feature request related to a problem? Please describe. When you have multiple accounts (whether for personal or business), it's difficult managing all of them.

Oftentimes, I'll come cross posts (under my personal account) that I wanna upvote, comment, or save—but to a different account.

Here's an example: I'm on my personal account, hiramfromthechi. I come across a basketball post that I'd like to interact with, but I'd like to interact with that post with my basketball page, InThePaintCrew.

Currently, I need to switch accounts (which might refresh the feed, or least lose the current position of the feed), and then find the post I wanna interact with so that I can do it with my InThePaintCrew account.

Describe the solution you'd like At the post level, it'd be great to choose the account you wanna interact with first, before submitting the interaction. Especially when it comes to commenting and saving posts.

Describe alternatives you've considered N/A

Additional context Both Boost for Reddit and Slide for Reddit had this. Would love to see this functionality make it to Thunder for Lemmy.

hiramfromthechi avatar Jul 12 '23 17:07 hiramfromthechi

This is an interesting idea! Do you happen to have any screenshots or videos on how this might potentially work (from Boost/Slide) This would help with visualizing how we go about implementing this in the future

I would have to see how this works when you're interacting with posts on a different instance. I believe it should be possible, but I'm not sure if there are any side effects that have to be considered here.

hjiangsu avatar Jul 12 '23 20:07 hjiangsu

Agh, since all third-party apps are dead now, I can't grab a screenshot or video of this feature in action. It was very straightforward though, just a simple dropdown where you selected whichever account you were already logged into: pSRWRdZe@2x H0fQLQun@2x

hiramfromthechi avatar Jul 12 '23 23:07 hiramfromthechi

Liftoff has this feature somewhat, where you can change what instance you are viewing a post from. Putting this into the reply would be a nice feature. Screenshot_20230712-195949~2

At the very least the comment drawer should say what user your using to reply with.

jordan1776 avatar Jul 13 '23 00:07 jordan1776

RedReader also has this functionality for both posting and commenting. Personally, I find being able to switch accounts when commenting the most useful since it happens with more frequency than posting. However, both would be convenient.

Coehill avatar Sep 21 '23 14:09 Coehill

This feature worked great in reddit apps, but doesn't necessarily work on Lemmy. A least not without caveats. It'll be fine if both of your accounts are on the same instance, but won't necessarily work if they aren't.

You can never use an account from a different instance to comment on a post. You must make your comment on your instance's copy of a post and then it will get federated back to the original post. (Or sometimes not... when federation fails, and only people on your instance will ever see your comment.)

A foreign instance's post doesn't necessarily even exist on your instance. It won't unless someone on your instance subscribes to that community and only if the post is no older than when the first user on your instance subscribed to that community. (Something like the most recent 20 or 50 posts are copied over when the first person on your instance subscribes to another instance's community. And then federation brings all the new ones over, too.)

I only mentioned comments, but this applies to all actions. Every action you take on Lemmy must be done on your home instance where you are logged in: saving, voting, commenting, etc.

It makes this feature very tricky to implement even when it would work at all. Post IDs for the same post are different on different instances.

(It's entirely possible I got any number of facts wrong in this reply. Federation is complex. But this is my current understanding of it.)

Glazed avatar Mar 04 '24 07:03 Glazed

Just wanted to chime in on this topic. Most of the information that @Glazed provided is correct! You can only perform actions on your instance's copy of a post/comment because the ids of posts/comments/users/communities are all different across instances.

However, I believe that cross-account actions are possible to some extent (with one major caveat). The main caveat is figuring out if the associated post or comment exists (a.k.a., is federated) on a given user's instance. If the post or comment is not federated with the instance that the account is attached to, then there is no way to perform actions from a different account.

Luckily, there's an API endpoint that we can call to fetch the remote instance's version of the post, comment, etc. This then allows us to perform all the normal actions that we could on a post/comment (saving, voting, etc). @micahmo has implemented a way to post as a different user in #1159 which takes into account this! We can extend this over in the future to allow for cross-account actions

hjiangsu avatar Mar 04 '24 16:03 hjiangsu

Agreed on all points! @Glazed is right, but it's really not as hard as it seems. The only thing that makes it more tricky than Reddit is whether the object in question has federated, and as @hjiangsu said, there's a single endpoint we can call to check that, so it's really just one added step. 😊

micahmo avatar Mar 04 '24 16:03 micahmo