Skip to content

How to unfollow? #1245

Answered by myConsciousness
aoisensi asked this question in Q&A
Feb 13, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @aoisensi

This is very easy, basically you can see from the ActorViewer object whether you are being followed by a particular user or not.

Though there are many different ways to access this property, I show you some examples:

From Timeline

import 'package:bluesky/bluesky.dart';

Future<void> main() async {
  final bsky = Bluesky.fromSession(
    await _session, // This is your session.
  );

  final timeline = await bsky.feed.getTimeline();

  for (final feed in timeline.data.feed) {
    final postAuthor = feed.post.author;

    // Check if you're following this post author.
    if (postAuthor.viewer.isFollowing) {
      // Unfollow.
      await bsky.repo.deleteRecord(uri: postAuthor.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aoisensi
Comment options

Answer selected by aoisensi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants