Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

emoji and irc safe characters #45

Open
skibz opened this issue Jan 23, 2019 · 2 comments
Open

emoji and irc safe characters #45

skibz opened this issue Jan 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@skibz
Copy link

skibz commented Jan 23, 2019

i realise that there is a previous issue relating to what i'm writing about.

however, i am not convinced that handling emoji is out of the scope of whapp-irc's responsibilities.

most importantly, it is possible to name a group or contact with just emoji: for example, a person who has the name "💩".

so, given that name, when whapp-irc enumerates conversations and contacts, some of these names just end up as empty strings, rendering it impossible to direct communications to them from an irc client.

what is also unclear is what happens if more than one contact or conversation has an emoji name. will whapp-irc report that there are fewer contacts/conversations than there really are because it has found multiple contacts with the same name (an empty string)?

@lieuwex
Copy link
Owner

lieuwex commented Jan 23, 2019

Yeah emoji-only chat names are a actually a pretty good corner case. I'm more a bit skeptical about converting emoji names in chat messages, since that's something that a client should do. Originally I allowed emoji names in IRC channel names, but that got a bit messy with most clients.

I feel like indeed converting emoji's in chat identifiers is a good thing to have, if somebody is willing to implement it.

what is also unclear is what happens if more than one contact or conversation has an emoji name.

Depending on how you get that report, no, it should still count them as separate chats. The only problem is that they've identical identifiers, so it can differ from time to time which chat is actually used.

@lieuwex lieuwex added the enhancement New feature or request label Jan 23, 2019
@skibz
Copy link
Author

skibz commented Jan 24, 2019

so it can differ from time to time which chat is actually used.

using a map[string]int data structure where the key is a hash of the chat identifier, and the value is the number of occurrences of the chat identifier, it'll hopefully make it easy to ensure every chat identifier is distinct.

i've got a naive solution to this problem running in a fork, already, but without the duplicate name checking. i'll add this to my list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants