merge method
Returns a new OwnUser that is a combination of this ownUser
and the given other
ownUser.
Implementation
OwnUser merge(OwnUser? other) {
if (other == null) return this;
return copyWith(
id: other.id,
role: other.role,
// Using extraData value in order to not use id as name.
name: other.extraData['name'] as String?,
image: other.image,
banned: other.banned,
channelMutes: other.channelMutes,
createdAt: other.createdAt,
devices: other.devices,
extraData: other.extraData,
lastActive: other.lastActive,
mutes: other.mutes,
online: other.online,
teams: other.teams,
totalUnreadCount: other.totalUnreadCount,
unreadChannels: other.unreadChannels,
updatedAt: other.updatedAt,
language: other.language,
);
}