broadcastRemoveFollowedTag method

Future<ContactList?> broadcastRemoveFollowedTag(
  1. String toRemove,
  2. Iterable<String> relays,
  3. EventSigner signer
)

Implementation

Future<ContactList?> broadcastRemoveFollowedTag(String toRemove,
    Iterable<String> relays, EventSigner signer) async {
  ContactList? contactList = await ensureUpToDateContactListOrEmpty(signer);
  if (contactList.followedTags.contains(toRemove)) {
    contactList.followedTags.remove(toRemove);
    contactList.loadedTimestamp = Helpers.now;
    contactList.createdAt = Helpers.now;
    await broadcastEvent(contactList.toEvent(), relays, signer);
    await cacheManager.saveContactList(contactList);
  }
  return contactList;
}