Skip to main content

Following And Unfollowing

Methods for profiles#

Follow An Account#

Start following an account.

substrateApi.tx.profileFollows.followAccount(AccountId: AnyAccountId)

Example:

...
const tx = substrateApi.tx.profileFollows.followAccount('3osmnRNnrcScHsgkTJH1xyBF5kGjpbWHsGrqM31BJpy4vwn8')
...

Unfollow An Account#

Stop following an account.

substrateApi.tx.profileFollows.unfollowAccount(AccountId: AnyAccountId)

Example:

...
const tx = substrateApi.tx.profileFollows.unfollowAccount('3osmnRNnrcScHsgkTJH1xyBF5kGjpbWHsGrqM31BJpy4vwn8')
...

๐Ÿ†ƒ AnyAccountId: AccountId | string

Methods for spaces#

Follow A Space#

Start following a space.

substrateApi.tx.spaceFollows.followSpace(SpaceId: AnySpaceId)

Example:

...
const tx = substrateApi.tx.spaceFollows.followSpace('1')
...

Unfollow A Space#

Stop following a space.

substrateApi.tx.spaceFollows.unfollowSpace(SpaceId: AnySpaceId)

Example:

...
const tx = substrateApi.tx.spaceFollows.unfollowSpace('1')
...

๐Ÿ†ƒ AnySpaceId: SpaceId | BN