Skip to content
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

Is there a way to send message to a contact instead of making a reply using say()? #1734

Closed
raymondpang365 opened this issue Apr 5, 2019 · 0 comments

Comments

@raymondpang365
Copy link

raymondpang365 commented Apr 5, 2019

Problem:
I would like to send a message to a contact in one-to-one chat instead of making a reply.
If I understand correctly, say() can only send a reply to the sender or in a room with @mention.
So if I have a contact's id, is there a way I can initiate a one-to-one chat message to that contact instead of requiring a sender to send a message to the bot first?

Possible solution:
Do you think the say function should take 2 more parameters, which let us specify roomId and contactId?
If roomId and contactId are both unspecified, then it could send a reply as usual.

m.say (
    textOrContactOrFileOrUrl : string | Contact | FileBox | UrlLink,
    roomId,
    contactId
  )

[enhancement]

@raymondpang365 raymondpang365 changed the title Is there a way to send message to a contact by specifying the contact if using say()? Is there a way to send message to a contact instead of making a reply using say()? Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant