From 31b6825548fa42bc6a0616708c7e9df8ff4113c4 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Tue, 19 Jun 2018 00:10:31 +0800 Subject: [PATCH] show deprecated message for `friend` event (#1312) --- src/wechaty.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wechaty.ts b/src/wechaty.ts index 5edd3c2f..dcc5ff1f 100644 --- a/src/wechaty.ts +++ b/src/wechaty.ts @@ -389,11 +389,11 @@ export class Wechaty extends Accessory implements Sayable { // DEPRECATED for 'friend' event if (event as any === 'friend') { - log.warn('Wechaty', 'on(friend) is DEPRECATED. use on(friendship) instead') + log.warn('Wechaty', `on('friend', contact, friendRequest) is DEPRECATED. use on('friendship', friendship) instead`) if (typeof listener === 'function') { const oldListener = listener listener = (...args: any[]) => { - log.warn('Wechaty', 'on(friend) is DEPRECATED. use on(friendship) instead') + log.warn('Wechaty', `on('friend', contact, friendRequest) is DEPRECATED. use on('friendship', friendship) instead`) oldListener.apply(this, args) } } -- GitLab