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

Merged
merged 1 commit into from Apr 28, 2017

Conversation

Projects
None yet
5 participants
@lijiarui
Member

lijiarui commented Apr 26, 2017

#362
add m.mentioned() for message, thanks for @JasLin tell us about magic code when @ somebody,
so add maigic code in room.say()

@lijiarui lijiarui changed the title from add room.say() magic code when try to mention someone to add magic code for room.say() when `@bot ` happen Apr 26, 2017

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Apr 26, 2017

Coverage Status

Coverage decreased (-0.02%) to 55.023% when pulling b1029f6 on lijiarui:room_say_mention into 8c1c165 on Chatie:master.

coveralls commented Apr 26, 2017

Coverage Status

Coverage decreased (-0.02%) to 55.023% when pulling b1029f6 on lijiarui:room_say_mention into 8c1c165 on Chatie:master.

@@ -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)

This comment has been minimized.

@zixia

zixia Apr 27, 2017

Member

Don't we need the space to separate the contacts?

const mentionList = replyToList.map(c => '@' + c.name()).join(AT_SEPRATOR + ' ')

@zixia

zixia Apr 27, 2017

Member

Don't we need the space to separate the contacts?

const mentionList = replyToList.map(c => '@' + c.name()).join(AT_SEPRATOR + ' ')

This comment has been minimized.

@lijiarui

lijiarui Apr 27, 2017

Member

no, we don't need, AT_SEPRATOR equals space.

wechat use special char with unicode code 8197 to indetify real@
by @JasLin

@lijiarui

lijiarui Apr 27, 2017

Member

no, we don't need, AT_SEPRATOR equals space.

wechat use special char with unicode code 8197 to indetify real@
by @JasLin

This comment has been minimized.

@zixia

zixia Apr 28, 2017

Member

OK

@zixia

zixia Apr 28, 2017

Member

OK

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 27, 2017

Member

Ok, ic. Please get at least one approvement before I could merge this PR.

Thanks!

Member

zixia commented Apr 27, 2017

Ok, ic. Please get at least one approvement before I could merge this PR.

Thanks!

@JasLin

JasLin approved these changes Apr 27, 2017

great job:)

@Gcaufy

Gcaufy approved these changes Apr 27, 2017

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 28, 2017

Member

Thanks all for approving!

Member

zixia commented Apr 28, 2017

Thanks all for approving!

@zixia zixia merged commit afa9f34 into Chatie:master Apr 28, 2017

4 of 6 checks passed

ci/circleci Your tests failed on CircleCI
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.02%) to 55.023%
Details
security/snyk No new vulnerabilities
Details

@lijiarui lijiarui deleted the lijiarui:room_say_mention branch Apr 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment