Commit 877a8efe authored by Him188's avatar Him188

Ignore old Group settings. Fix #373

parent 245d5214
...@@ -129,7 +129,7 @@ internal class GroupImpl( ...@@ -129,7 +129,7 @@ internal class GroupImpl(
get() = _announcement get() = _announcement
set(newValue) { set(newValue) {
checkBotPermission(MemberPermission.ADMINISTRATOR) checkBotPermission(MemberPermission.ADMINISTRATOR)
if (_announcement != newValue) { //if (_announcement != newValue) {
val oldValue = _announcement val oldValue = _announcement
_announcement = newValue _announcement = newValue
launch { launch {
...@@ -142,7 +142,7 @@ internal class GroupImpl( ...@@ -142,7 +142,7 @@ internal class GroupImpl(
} }
GroupEntranceAnnouncementChangeEvent(oldValue, newValue, this@GroupImpl, null).broadcast() GroupEntranceAnnouncementChangeEvent(oldValue, newValue, this@GroupImpl, null).broadcast()
} }
} //}
} }
...@@ -150,7 +150,7 @@ internal class GroupImpl( ...@@ -150,7 +150,7 @@ internal class GroupImpl(
get() = _allowMemberInvite get() = _allowMemberInvite
set(newValue) { set(newValue) {
checkBotPermission(MemberPermission.ADMINISTRATOR) checkBotPermission(MemberPermission.ADMINISTRATOR)
if (_allowMemberInvite != newValue) { //if (_allowMemberInvite != newValue) {
val oldValue = _allowMemberInvite val oldValue = _allowMemberInvite
_allowMemberInvite = newValue _allowMemberInvite = newValue
launch { launch {
...@@ -163,7 +163,7 @@ internal class GroupImpl( ...@@ -163,7 +163,7 @@ internal class GroupImpl(
} }
GroupAllowMemberInviteEvent(oldValue, newValue, this@GroupImpl, null).broadcast() GroupAllowMemberInviteEvent(oldValue, newValue, this@GroupImpl, null).broadcast()
} }
} //}
} }
override var isAutoApproveEnabled: Boolean override var isAutoApproveEnabled: Boolean
...@@ -180,12 +180,13 @@ internal class GroupImpl( ...@@ -180,12 +180,13 @@ internal class GroupImpl(
TODO() TODO()
} }
@Suppress("OverridingDeprecatedMember")
override var isConfessTalkEnabled: Boolean override var isConfessTalkEnabled: Boolean
get() = _confessTalk get() = _confessTalk
set(newValue) { set(newValue) {
checkBotPermission(MemberPermission.ADMINISTRATOR) checkBotPermission(MemberPermission.ADMINISTRATOR)
if (_confessTalk != newValue) { //if (_confessTalk != newValue) {
val oldValue = _confessTalk val oldValue = _confessTalk
_confessTalk = newValue _confessTalk = newValue
launch { launch {
...@@ -198,16 +199,15 @@ internal class GroupImpl( ...@@ -198,16 +199,15 @@ internal class GroupImpl(
} }
GroupAllowConfessTalkEvent(oldValue, newValue, this@GroupImpl, true).broadcast() GroupAllowConfessTalkEvent(oldValue, newValue, this@GroupImpl, true).broadcast()
} }
} // }
} }
override var isMuteAll: Boolean override var isMuteAll: Boolean
get() = _muteAll get() = _muteAll
set(newValue) { set(newValue) {
checkBotPermission(MemberPermission.ADMINISTRATOR) checkBotPermission(MemberPermission.ADMINISTRATOR)
if (_muteAll != newValue) { //if (_muteAll != newValue) {
val oldValue = _muteAll val oldValue = _muteAll
_muteAll = newValue _muteAll = newValue
launch { launch {
...@@ -220,7 +220,7 @@ internal class GroupImpl( ...@@ -220,7 +220,7 @@ internal class GroupImpl(
} }
GroupMuteAllEvent(oldValue, newValue, this@GroupImpl, null).broadcast() GroupMuteAllEvent(oldValue, newValue, this@GroupImpl, null).broadcast()
} }
} //}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment