Commit 4ce581e 1 parent 9236146 commit 4ce581e Copy full SHA for 4ce581e
File tree 7 files changed +14
-65
lines changed
commonMain/kotlin/contact/announcement
jvmBaseMain/kotlin/contact/announcement
nativeMain/kotlin/contact/announcement
src/commonMain/kotlin/contact/announcement
7 files changed +14
-65
lines changed Original file line number Diff line number Diff line change @@ -803,6 +803,7 @@ public final class net/mamoe/mirai/contact/announcement/AnnouncementImage {
803
803
public fun equals (Ljava/lang/Object;)Z
804
804
public final fun getHeight ()I
805
805
public final fun getId ()Ljava/lang/String;
806
+ public final fun getUrl ()Ljava/lang/String;
806
807
public final fun getWidth ()I
807
808
public fun hashCode ()I
808
809
public fun toString ()Ljava/lang/String;
Original file line number Diff line number Diff line change @@ -803,6 +803,7 @@ public final class net/mamoe/mirai/contact/announcement/AnnouncementImage {
803
803
public fun equals (Ljava/lang/Object;)Z
804
804
public final fun getHeight ()I
805
805
public final fun getId ()Ljava/lang/String;
806
+ public final fun getUrl ()Ljava/lang/String;
806
807
public final fun getWidth ()I
807
808
public fun hashCode ()I
808
809
public fun toString ()Ljava/lang/String;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2019-2022 Mamoe Technologies and contributors.
2
+ * Copyright 2019-2023 Mamoe Technologies and contributors.
3
3
*
4
4
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
5
5
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@@ -31,6 +31,11 @@ public class AnnouncementImage private constructor(
31
31
) {
32
32
// For stability, do not make it `data class`.
33
33
34
+ /* *
35
+ * @since 2.15
36
+ */
37
+ public val url: String get() = " https://gdynamic.qpic.cn/gdynamic/$id /628"
38
+
34
39
public companion object {
35
40
public const val SERIAL_NAME : String = " AnnouncementImage"
36
41
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2019-2022 Mamoe Technologies and contributors.
2
+ * Copyright 2019-2023 Mamoe Technologies and contributors.
3
3
*
4
4
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
5
5
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@@ -48,12 +48,7 @@ import net.mamoe.mirai.utils.*
48
48
import net.mamoe.mirai.utils.Either.Companion.onLeft
49
49
import net.mamoe.mirai.utils.Either.Companion.rightOrNull
50
50
51
- internal expect class AnnouncementsImpl (
52
- group : GroupImpl ,
53
- logger : MiraiLogger ,
54
- ) : CommonAnnouncementsImpl
55
-
56
- internal abstract class CommonAnnouncementsImpl (
51
+ internal class AnnouncementsImpl (
57
52
protected val group : GroupImpl ,
58
53
protected val logger : MiraiLogger ,
59
54
) : Announcements {
@@ -412,6 +407,7 @@ internal object AnnouncementProtocol {
412
407
showPopup = settings.tipWindowType == 0
413
408
requireConfirmation = settings.confirmRequired == 1
414
409
showEditCard = settings.isShowEditCard == 1
410
+ image = msg.images.firstOrNull()?.toPublic()
415
411
},
416
412
fid = fid,
417
413
allConfirmed = isAllConfirm != 0 ,
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2019-2021 Mamoe Technologies and contributors.
2
+ * Copyright 2019-2023 Mamoe Technologies and contributors.
3
3
*
4
4
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
5
5
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@@ -63,7 +63,8 @@ internal class GroupAnnouncementImage @MiraiInternalApi constructor(
63
63
@Serializable
64
64
internal data class GroupAnnouncementMsg (
65
65
val text : String ,
66
- val text_face : String? = null ,
66
+ @SerialName(" text_face" ) val textFace : String? = null ,
67
+ @SerialName(" pics" ) val images : List <GroupAnnouncementImage > = emptyList(),
67
68
// val title: String? = null // no title any more
68
69
)
69
70
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments