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

Remove Emoji from nickname before joining a room #880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bcow7
Copy link

@Bcow7 Bcow7 commented Feb 24, 2017

As reported in the issue #879, it isn’t possible to join a MUC with a
nickname that contains some Emojis.
Quick fix that prevent failure.

As reported in the issue robbiehanson#879, it isn’t possible to join a MUC with a
nickname that contains some Emojis.
Quick fix that prevent failure.
@chrisballinger
Copy link
Collaborator

Are you using the latest version of KissXML? Issues with encoding UTF-8 / emoji were fixed a few months ago, but perhaps there are other areas that we missed. robbiehanson/KissXML#36

I'm not sure if stripping certain unicode values in XMPPFramework is the right approach if it's technically valid and accepted by some(?) servers.

@Bcow7
Copy link
Author

Bcow7 commented Feb 24, 2017

I'm using KissXML (5.1.2) and XMPPFramework (3.7.0)

I know that unicode are accepted by servers into messages, but I was ignoring that we can use them inside nicknames...so maybe you're right and it is better to keep the framework like it is...

@Bcow7
Copy link
Author

Bcow7 commented Mar 3, 2017

But maybe we could trigger an error when the library fails to join the MUC in this case, what do you think?

@chrisballinger
Copy link
Collaborator

@Bcow7 That would make sense, but I'm not familiar enough with the MUC spec to know how to properly catch the error. Here's where we handle successful joins:

https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0045/XMPPRoom.m#L1051

I'm guessing you could add XMPPIDTracker to - (void)joinRoomUsingNickname:(NSString *)desiredNickname history:(NSXMLElement *)history password:(NSString *)passwd and look for errors:

https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0045/XMPPRoom.m#L265

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

Successfully merging this pull request may close these issues.

2 participants