Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch accounts at the post level #341

Open
hiramfromthechi opened this issue Jul 12, 2023 · 7 comments
Open

Switch accounts at the post level #341

hiramfromthechi opened this issue Jul 12, 2023 · 7 comments
Labels
enhancement New feature or request in-progress Indicates that an issue is currently being worked on

Comments

@hiramfromthechi
Copy link

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 hiramfromthechi added the enhancement New feature or request label Jul 12, 2023
@hjiangsu
Copy link
Member

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.

@hiramfromthechi
Copy link
Author

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

@jordan1776
Copy link

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.

@Coehill
Copy link

Coehill commented Sep 21, 2023

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.

@Glazed
Copy link

Glazed commented Mar 4, 2024

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.)

@hjiangsu
Copy link
Member

hjiangsu commented Mar 4, 2024

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

@micahmo
Copy link
Member

micahmo commented Mar 4, 2024

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 micahmo added the in-progress Indicates that an issue is currently being worked on label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in-progress Indicates that an issue is currently being worked on
Projects
None yet
Development

No branches or pull requests

6 participants