-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add magic code for room.say() when @bot
happen
#440
Conversation
@bot
happen
@@ -184,7 +184,8 @@ export class Room extends EventEmitter implements Sayable { | |||
const replyToList: Contact[] = [].concat(replyTo as any || []) | |||
|
|||
if (replyToList.length > 0) { | |||
const mentionList = replyToList.map(c => '@' + c.name()).join(' ') | |||
const AT_SEPRATOR = String.fromCharCode(8197) | |||
const mentionList = replyToList.map(c => '@' + c.name()).join(AT_SEPRATOR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need the space to separate the contacts?
const mentionList = replyToList.map(c => '@' + c.name()).join(AT_SEPRATOR + ' ')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, we don't need, AT_SEPRATOR
equals space.
wechat use special char with unicode code 8197 to indetify real@
by @JasLin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Ok, ic. Please get at least one approvement before I could merge this PR. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job:)
Thanks all for approving! |
#362
add m.mentioned() for message, thanks for @JasLin tell us about magic code when @ somebody,
so add maigic code in room.say()