mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Filter repeated GroupNameChangeEvent
This commit is contained in:
parent
2a7496c0b5
commit
5e553a56ca
@ -311,14 +311,18 @@ internal class OnlinePush {
|
|||||||
// println(dataBytes.toUHexString())
|
// println(dataBytes.toUHexString())
|
||||||
|
|
||||||
if (dataBytes[0].toInt() != 59) {
|
if (dataBytes[0].toInt() != 59) {
|
||||||
return@flatMap sequenceOf(
|
return@flatMap if (group.name != message) {
|
||||||
GroupNameChangeEvent(
|
sequenceOf(
|
||||||
origin = group.name.also { group._name = message },
|
GroupNameChangeEvent(
|
||||||
new = message,
|
origin = group.name.also { group._name = message },
|
||||||
group = group,
|
new = message,
|
||||||
isByBot = false
|
group = group,
|
||||||
|
isByBot = false
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
} else {
|
||||||
|
sequenceOf()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//println(message + ":" + dataBytes.toUHexString())
|
//println(message + ":" + dataBytes.toUHexString())
|
||||||
when (message) {
|
when (message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user