-
wrath
> yeah, its just easier to understand > > but for machines its harder to process Maybe for machines from the 1970s But we have webpages that take up more ram than Prosody now so that's not really a valid argument imo
-
nicoco
> ... copy paste from xsf@ ... > Hi. A question about avatar conversion (xep-398). > What's going to happen if I publish my vcard without photo? Will it reset avatar in pubsub? > > XEP says "A service MAY support conversion from vCard to PEP in order to display avatars in clients that only support XEP-0084.". > I assume it means if two clients are connected (one publishing vcard and second one supporting just xep-84, then the second one MAY receive pubsub update). and that's all. > From other side the xep insist all the control to be done via pubsub. So it's no clear should I always add an avatar to the publishing vcard or not. rion: I am not entirely sure, but I think the current "standard" behaviour is for clients to only use XEP-0084, then servers to support XEP-0398 because that's how we have avatars in groupchats, and finally there's XEP-0292 where you're not really supposed to put a photo, although it's technically supported but since it lacks the "hash update" mechanism of XEP-0084, it's not used in practice. ↺
-
nicoco
I mean, clients should support xep-0153 if they want to display avatars in MUCs too, but AFAIK modern clients don't use it to set avatars. A useful resource? https://docs.modernxmpp.org/client/protocol/#avatars
-
MSavoritias (fae,ve)
and thats not even half the xeps mentioned there oO
-
MSavoritias (fae,ve)
this needs cleaning up
-
MSavoritias (fae,ve)
this -> xeps
-
rion
nicoco: 🙏
-
rion
Is there gpl2 compatible C/C++ implementation of emoji detector/extractor in text? I mean some sort of lib capable to detect where an emoji begins for example in utf16 encoded string and where it ends. Or maybe somebody has some good implementation in mind in some other language which I can port to C++.
-
singpolyma
rion: https://unicode-org.github.io/icu/userguide/strings/regexp.html
-
singpolyma
I use this regex: (\p{Emoji}.*\p{Me})|\p{Emoji_Presentation}|\65039
-
singpolyma
on individual grapheme clusters
-
singpolyma
which libicu can also break apart for you: ICU.brkBreak $ headZ $ ICU.breaks (ICU.breakCharacter ICU.Root) string
-
rion
singpolyma: does it consider zero-width-joiners, qualification and bunch of various modifiers?
-
rion
For example will it match this? 1F469 1F3FB 200D 2764 FE0F 200D 1F48B 200D 1F468 1F3FC ; fully-qualified # 👩🏻❤️💋👨🏼 E13.1 kiss: woman, man, light skin tone, medium-light skin tone Yes, there is one single picture after "#". If somebody sees many pictures, it's because of bad unicode of fonts support.✎ -
rion
For example will it match this? 1F469 1F3FB 200D 2764 FE0F 200D 1F48B 200D 1F468 1F3FC ; fully-qualified # 👩🏻❤️💋👨🏼 E13.1 kiss: woman, man, light skin tone, medium-light skin tone Yes, there is one single picture after "#". If somebody sees many pictures, it's because of bad unicode or fonts support. ✏
-
singpolyma
Yes. If you grapheme segment that's all handled
-
lovetox
Fun with reactions, we just discovered that the GTK Emoji picker produces invalid emoji presentation sequences
-
lovetox
it adds a emoji variant selector on any emoji
-
singpolyma
That's not invalid
-
singpolyma
It's just not required
-
lovetox
im reading this differently
-
lovetox
https://www.unicode.org/reports/tr51/proposed.html#Emoji_Implementation_Notes
-
lovetox
> may have an emoji or text presentation selector added if the result is a valid emoji presentation sequence or text presentation sequence
-
lovetox
*if the result is valid*
-
lovetox
and its not valid
-
singpolyma
Why is it not?
-
singpolyma
Is the result not an emoji?
-
lovetox
because emoji presentation sequence is a defind set of emojis
-
lovetox
and this is not in there
-
singpolyma
Or text presentation sequence
-
lovetox
https://www.unicode.org/Public/draft/UCD/ucd/emoji/emoji-variation-sequences.txt
-
lovetox
every sequence thats not in that list is by definition not a valid emoji presentation sequence
-
singpolyma
It's somehow an emoji sequence that is neither an emoji sequence nor a text sequence?
-
lovetox
i dont know what it is, its a combination of codepoints not defined anywhere
-
lovetox
at least thats how i read the implementation notes
-
singpolyma
So you pick an emoji from the picker but the sequence you picked is an undefined sequence and then they add the selector to this undefined sequence?
-
singpolyma
Seems strange that an valid emoji gjyph would be an undefined sequence
-
lovetox
no, 📯️ for example, it has no defined emoji presentation sequence
-
lovetox
because its clear how this codepoint is to be displayed, no need to add any variation selector
-
lovetox
hence adding to this a selector is not defined anywhere
-
singpolyma
So that's not an emoji?
-
lovetox
depends, a font can simply render the first codepoint
-
lovetox
and ignore the second
-
lovetox
if you pass the whole string to a library
-
lovetox
and ask "is this string an emoji"
-
lovetox
it should say no
-
singpolyma
What are the two codepoints in this context?
-
lovetox
128239 and 65039 for this example
-
lovetox
65039 (U+FE0F) is the emoji variant selecotr
-
lovetox
it makes sense for receivers like fonts, to not fail on this
-
singpolyma
So is 128239 a valid emoji sequence by itself or not?
-
lovetox
thats on codepoint, and not a sequence
-
lovetox
a sequence are multiple codepoints
-
lovetox
yes of course the horn emoji is a valid emoji character
-
lovetox
but adding the emoji variant selector makes it not a valid sequence
-
lovetox
the same as you cant add a skin tone color modifier on the copyright emoji
-
lovetox
and say thats a valid sequence
-
singpolyma
I thought the thing you quoted said emiji selector could be added to any valid text or emoji sequence?
-
lovetox
> may have an emoji or text presentation selector added if the result is a valid emoji presentation sequence or text presentation sequence
-
lovetox
this sentence?
-
singpolyma
Ah, hmm. If the result is. I see it now. Odd way to define it but i guuss this is a gtk bug then technically
-
singpolyma
Probably not one that really matters, but yeah
-
lovetox
i just mention it here, because all people that now implement reactions, search for libs that check if something *is* an emoji
-
lovetox
and i think this will lead to funny problems
-
singpolyma
All my emoji code says if a graphene cluster contains emoji selector then the cluster is an emoji. But I realize now I developed this testing against gajim and Dino which is probably why i saw that so often
-
lovetox
haha bingo
-
singpolyma
I think thats still a correct thing, but yeah someone might hardcode a list or something and have problems
-
singpolyma
Though for reaction probably shouldn't care if it's an emoji orknot
-
lovetox
yeah? you will display any string i send you?
-
singpolyma
Why not?
-
singpolyma
The hard part is deciding two emoji with and without selector are "the same" for counting. Or the two kinds of red heart etc. if one wants to do that
-
lovetox
for one i dont design a reaction presentation bar, to contain any kind of string length
-
lovetox
second, it creates abuse potential
-
lovetox
as you cant moderate reactions for example
-
singpolyma
> as you cant moderate reactions for example Why not? ↺
-
lovetox
ok technically✎ -
lovetox
ok technically maybe thats possible ✏
-
lovetox
practically, building a gui for that sounds challenging, and finding support in other clients probably also
-
lovetox
and all for what? to let people say "fuck you" in a reaction?
-
singpolyma
Well new emoji get added so hard coding a list is asking for trouble
-
lovetox
i dont have that opinion, there are > 4000 emojis
-
lovetox
and like 10 of them are used most of the time
-
singpolyma
So if I send a new one to an older gajim as reaction it just won't show it?
-
lovetox
i guess so, you are right thats a downside
-
lovetox
not convinced its a downside enough to let everything through
-
lovetox
i mean the first gajim version with reactions will support 4000 emojis
-
lovetox
i think its pretty safe to say that holds for many years
-
lovetox
on that topic, will you add a fallback text to reactions?
-
lovetox
*
-
singpolyma
Yes
-
lovetox
and how do you reference the message which the reaction belongs to
-
lovetox
with a quote?
-
singpolyma
Yes, quote/reply as fallback
-
singpolyma
> and how do you reference the message which the reaction belongs to You mean which id do I use? Just as per xep I think ↺
-
lovetox
no i meant in the fallback
-
lovetox
but you answered the question
-
singpolyma
Ah, yeah. Quote
-
lovetox
not sure i want to do that .. :/ on one side yeah can be useful, on the other side in MUCs where many clients have reactions, this probably floods the chat with quotes and reaction text
-
singpolyma
The alternative is thrt people are replying and it's invisible to some users
-
lovetox
yeah .. its probably the responsible thing to add the fallback text
-
singpolyma
If you don't like seeing 100 replies get a client with summary UI 😉
-
chud
Hello
-
moparisthebest
> and all for what? to let people say "fuck you" in a reaction? Well it's better than them replying "fuck you" :) ↺
-
lovetox
no its not, because if they reply in a message, i can easily moderate it in many clients who support message moderation
-
moparisthebest
Can't those same clients moderate reactions?
-
moparisthebest
They'll even see it as a message until they implement it no? Should work out of the box
-
lovetox
i dont plan to moderate reactions
-
lovetox
but i also dont play to let people write messages as reactions✎ -
lovetox
but i also dont plan to let people write messages as reactions ✏
-
moparisthebest
Why not? You can't whitelist reactions to prevent offensive ones...
-
lovetox
not that i did plan this, but why do you think there cant be a whitelist?
-
lovetox
i gave the reasons above, its not a easy task GUI wise to provide a UI to reatract reactions
-
lovetox
of course its relatively easy if there is *one* reaction
-
lovetox
hmm but probably i dont care by who, i only care about the image, so i could retract all
-
moparisthebest
I'm saying it's not like blocking "bad" reactions like 🖕 can prevent inappropriate reactions, imagine someone posts: > My mom just died And someone reacts: 😁🤣🎉🥳
-
moparisthebest
Yea I'd imagine you'd moderate all of that image
-
lovetox
yeah you can always be sarcastic ..
-
lovetox
true
-
lovetox
... ok i guess its not that hard to do it in the gui if you retract all of one kind
-
lovetox
i think you convinced me, to look into moderation
-
lovetox
still dont want text as reaction
-
lovetox
we have messages for text .. no need to abuse reactions for it
-
singpolyma
Agreed that it's not something tibspend effort trying to support
-
singpolyma
But I probably won't spend a lot of effort to prevent it either
-
lovetox
but you provide no ui to make a text reaction or?
-
lovetox
which client would do this? how would a text reaction even be a thing
-
lovetox
maybe thats a good argument for not testing for emojis, because no client will offer text reactions anyway
-
lovetox
so that leaves nerds who send custom stanzas
-
singpolyma
Exactly
-
lovetox
still we will need somekind of emoji normalisation
-
lovetox
because dino will send always with a emoji variant selector, and conversation maybe without
-
lovetox
so 2 different strings, you want to count as one
-
singpolyma
yes. This is something one might want
-
singpolyma
also are ❤️ and ♥️ the same?
-
singpolyma
Or skin tones on thumbs up, count together or no?
-
lovetox
this are different hearts with different codepoints
-
lovetox
so no they are not the same
-
lovetox
i dont understand your skin tone question, its a different topic
-
lovetox
ah or you mean if you should add different skin tone variations of the same thumbs up
-
lovetox
yeah valid question
-
lovetox
i wouldnt to be honest
-
lovetox
different skin tones are different emojis
-
lovetox
the problem with the variant selectors is, they are not different emojis
-
lovetox
you could simply strip all selectors for counting
-
lovetox
i think i will strip them before putting them in the database
-
lovetox
presentation selectors is just about presentation in the gui
-
lovetox
as i already know how i want them to be presented, i can simply strip them on all incoming stuff, and this normalises it