init method
Implementation
void init(String roomId, GiftUser owner, GiftUser self) {
if (this.roomId != roomId ||
selfInfo.userId != self.userId ||
ownerInfo.userId != owner.userId) {
this.roomId = roomId;
ownerInfo = owner;
selfInfo = self;
} else {
ownerInfo.updateUserInfo(owner);
selfInfo.updateUserInfo(self);
}
}