set method
Implementation
void set(Chat chat) {
this.chat = chat;
if (this is GroupChannel) {
(this as GroupChannel).lastMessage?.set(chat);
(this as GroupChannel).creator?.set(chat);
(this as GroupChannel).inviter?.set(chat);
for (final element in (this as GroupChannel).members) {
element.set(chat);
}
}
if (this is OpenChannel) {
for (final element in (this as OpenChannel).operators) {
element.set(chat);
}
}
if (this is FeedChannel) {
(this as FeedChannel).lastMessage?.set(chat);
for (final element in (this as FeedChannel).members) {
element.set(chat);
}
}
}