feat(llc): add support for channel.membership

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-05-19 14:34:04 +05:30
committed by xsahil03x
parent 8ae6023d48
commit b1e4e134ca
4 changed files with 41 additions and 44 deletions
@@ -171,6 +171,18 @@ class Channel {
return state!.channelStateStream.map((cs) => cs.channel?.config);
}
/// Relationship of the current user to this channel.
Member? get membership {
_checkInitialized();
return state!._channelState.channel?.membership;
}
/// Relationship of the current user to this channel as a stream.
Stream<Member?> get membershipStream {
_checkInitialized();
return state!.channelStateStream.map((cs) => cs.channel?.membership);
}
/// Channel user creator.
User? get createdBy {
_checkInitialized();