-
-
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
room mention contact should using roomAlias #1604
Comments
Yes, the idea is the right direction that we should go. PR is welcome. |
PR merged. Thanks for your contribution! |
Your code has a bug with the In short: - this.alias(c) || c.name()
+ await this.alias(c) || c.name() And that's the reason why your typing is not right. Instead of checking it again for the real reason, you go to the wrong direction one more step: force casting the type, which should normally be avoided. Please have a look at the new code, and feel free to ask if you have more questions. Thanks! |
I see! That is why. |
We had added an additional check for this special case: we do not allow to use promise as boolean anymore. @lijiarui Maybe you will want this feature too.
|
Purpose:
For now,
Our room.say(content,contact) will call contact name, but if contact has room alias, it should do room alias.
the order should be roomAlias > name. If the contact not set roomAlias, it would be name.
Is this a good idea? if so, I can do this PR
The text was updated successfully, but these errors were encountered: