提交 ec9e3a61 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

use mentionList(). deprecated mention()

上级 de7f69c2
......@@ -629,10 +629,10 @@ export class Message extends Accessory implements Sayable {
* @returns {Promise<Contact[]>} - Return message mentioned contactList
*
* @example
* const contactList = await message.mention()
* const contactList = await message.mentionList()
* console.log(contactList)
*/
public async mention (): Promise<Contact[]> {
public async mentionList (): Promise<Contact[]> {
log.verbose('Message', 'mention()')
const room = this.room()
......@@ -711,6 +711,11 @@ export class Message extends Accessory implements Sayable {
return contactList
}
public async mention (): Promise<Contact[]> {
log.warn('Message', 'mention() DEPRECATED. use mentionList() instead.')
return this.mentionList()
}
public async mentionText (): Promise<string> {
const text = this.text()
const room = this.room()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册