Commit f8282e7d authored by ryoii's avatar ryoii

correct default At display name

parent 7efcdf5a
......@@ -12,6 +12,7 @@
package net.mamoe.mirai.message.data
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.contact.groupCardOrNick
import net.mamoe.mirai.utils.MiraiInternalAPI
......@@ -22,7 +23,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
*/
class At @MiraiInternalAPI constructor(val target: Long, val display: String) : Message {
@UseExperimental(MiraiInternalAPI::class)
constructor(member: Member) : this(member.id, "@${member.nick}")
constructor(member: Member) : this(member.id, "@${member.groupCardOrNick}")
override fun toString(): String = display
......
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