canMessage method

Future<bool> canMessage(
  1. String address
)

Whether or not we can send messages to address.

This will return false when address has never signed up for XMTP or when the message is addressed to the sender (no self-messaging).

Implementation

Future<bool> canMessage(String address) async =>
    EthereumAddress.fromHex(address) != this.address &&
    await _contacts.hasUserContacts(address);