Rename Image.imageId to Image.id

This commit is contained in:
Him188 2019-10-16 12:59:49 +08:00
parent 6105ce8e9e
commit 4d870b2434
2 changed files with 6 additions and 6 deletions

View File

@ -76,10 +76,10 @@ data class PlainText(override val stringValue: String) : Message() {
* 图片消息. * 图片消息.
* 由接收消息时构建, 可直接发送 * 由接收消息时构建, 可直接发送
* *
* @param imageId 类似 `{7AA4B3AA-8C3C-0F45-2D9B-7F302A0ACEAA}.jpg`. 群的是大写id, 好友的是小写id * @param id 类似 `{7AA4B3AA-8C3C-0F45-2D9B-7F302A0ACEAA}.jpg`. 群的是大写id, 好友的是小写id
*/ */
data class Image(val imageId: String) : Message() { data class Image(val id: String) : Message() {
override val stringValue: String = "[$imageId]" override val stringValue: String = "[$id]"
} }
// ==================================== At ==================================== // ==================================== At ====================================
@ -168,7 +168,7 @@ data class MessageChain(
override fun retainAll(elements: Collection<Message>): Boolean = delegate.retainAll(elements) override fun retainAll(elements: Collection<Message>): Boolean = delegate.retainAll(elements)
override fun set(index: Int, element: Message): Message = delegate.set(index, element) override fun set(index: Int, element: Message): Message = delegate.set(index, element)
override fun subList(fromIndex: Int, toIndex: Int): MutableList<Message> = delegate.subList(fromIndex, toIndex) override fun subList(fromIndex: Int, toIndex: Int): MutableList<Message> = delegate.subList(fromIndex, toIndex)
override fun iterator(): MutableIterator<Message> = this.delegate.iterator() override fun iterator(): MutableIterator<Message> = delegate.iterator()
override operator fun contains(element: Message): Boolean = delegate.contains(element) override operator fun contains(element: Message): Boolean = delegate.contains(element)
override val size: Int = delegate.size override val size: Int = delegate.size
// endregion // endregion

View File

@ -143,7 +143,7 @@ fun MessageChain.toPacket(): ByteReadPacket = buildPacket {
writeLVPacket { writeLVPacket {
writeByte(0x02) writeByte(0x02)
writeLVString(imageId) writeLVString(id)
writeHex("04 00 " + writeHex("04 00 " +
"04 9B 53 B0 08 " + "04 9B 53 B0 08 " +
"05 00 " + "05 00 " +
@ -153,7 +153,7 @@ fun MessageChain.toPacket(): ByteReadPacket = buildPacket {
"07 00 " + "07 00 " +
"01 43 08 00 00 09 00 01 01 0B 00 00 14 00 04 11 00 00 00 15 00 04 00 00 02 BC 16 00 04 00 00 02 BC 18 00 04 00 00 7D 5E FF 00 5C 15 36 20 39 32 6B 41 31 43 39 62 35 33 62 30 30 38 64 39 38 61 35 61 37 30 20") "01 43 08 00 00 09 00 01 01 0B 00 00 14 00 04 11 00 00 00 15 00 04 00 00 02 BC 16 00 04 00 00 02 BC 18 00 04 00 00 7D 5E FF 00 5C 15 36 20 39 32 6B 41 31 43 39 62 35 33 62 30 30 38 64 39 38 61 35 61 37 30 20")
writeHex("20 20 20 20 20 35 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20") writeHex("20 20 20 20 20 35 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20")
writeStringUtf8(imageId) writeStringUtf8(id)
writeByte(0x41) writeByte(0x41)
} }
} }