Remove Emoji from nickname before joining a room#880
Remove Emoji from nickname before joining a room#880Bcow7 wants to merge 1 commit intorobbiehanson:masterfrom
Conversation
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.
|
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. |
|
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... |
|
But maybe we could trigger an error when the library fails to join the MUC in this case, what do you think? |
|
@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 https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0045/XMPPRoom.m#L265 |
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.