Are there clients implementing XEP-0461: Message Replies https://xmpp.org/extensions/xep-0461.html ?
nikhas joined
wurstsalat
A client to test against would be nice :)
rubihas left
rubihas joined
emdeehas left
Alexhas left
adx
movim, probably
debaclehas left
rubihas left
Matrix Traveler (bot)has left
homebeachhas left
homebeachhas joined
Matrix Traveler (bot)has joined
rubihas joined
Patigahas left
emdeehas joined
wurstsalathas left
pasdesushihas joined
rubihas left
rubihas joined
Vaulorhas left
Patigahas joined
sonnyhas left
adxhas left
rubihas left
rubihas joined
Schimon_has left
thomaslewishas joined
thomaslewishas left
thomaslewishas joined
Schimon_has joined
thomaslewishas left
rubihas left
rubihas joined
nikhas left
rubihas left
rubihas joined
Thilo Molitor
Dino?
nikhas joined
emdeehas left
rubihas left
nikhas left
emdeehas joined
kapadhas left
mhhas left
mhhas joined
zawarudohas left
rubihas joined
kurtainhas left
kurtainhas joined
Samhas left
rubihas left
Samhas joined
raghavgururajanhas joined
mhhas left
mhhas joined
kurtainhas left
thomaslewishas joined
thomaslewishas left
thomaslewishas joined
thomaslewishas left
kurtainhas joined
thomaslewishas joined
thomaslewishas left
rubihas joined
mhhas left
mhhas joined
thomaslewishas joined
thomaslewishas left
Vaulorhas joined
nicocohas joined
miruxhas joined
trần.h.trunghas left
trần.h.trunghas joined
MSavoritias (fae,ve)has joined
Samhas left
Samhas joined
rubihas left
trần.h.trunghas left
trần.h.trunghas joined
debaclehas joined
Yagizаhas joined
thomaslewishas joined
pasdesushihas left
thomaslewishas left
Beherithas left
atomicwatchhas joined
rubihas joined
Mario Sabatinohas joined
mhhas left
stuart.j.mackintoshhas joined
mhhas joined
pasdesushihas joined
trần.h.trunghas left
trần.h.trunghas joined
wurstsalathas joined
Alexhas joined
larmahas joined
heartyhas left
heartyhas joined
jubalhhas joined
pasdesushihas left
goffihas joined
Schimon_has left
Schimon_has joined
nicocohas left
nicocohas joined
antranigvhas joined
Kevhas joined
wurstsalat
Ah, Movim supports it, thanks!
Kevhas left
goffihas left
goffihas joined
nicoco
wurstsalat: not sure if edhelas fixed it, but there was an issue with character counting in the fallback body
trần.h.trunghas left
trần.h.trunghas joined
goffihas left
goffihas joined
nicoco
but anyway XEP-0426 needs to be updated. it does not mention newlines and how to deal with trailing whitespace. https://xmpp.org/extensions/xep-0461.html#example-2 just omits newlines and trims left and right whitespace on each line before counting.
I think trimming trailing whitespace on each line makes sense, but not counting newline does not seem sensible to me. I planned to submit a patch for this example and also for the character counting xep, but haven't done it yet.
nicoco
let me know if you reach the same conclusions as me wurstsalat. by the way, you have a xep-0461 implementation in python-nbxmpp yet?
jubalhhas left
thomaslewishas joined
thomaslewishas left
nicocohas left
nicocohas joined
wurstsalat
nicoco: yep, I have a prototype in nbxmpp and Gajim. it seems to work fine with Movim, back and forth :) no issues counting characters in the fallback though. I noticed Movim doesn't add a newline after the fallback, yes. But that doesn't affect counting. It just works so far
nicoco
so you just count everything in the fallback with python's str.__len__()?
nicoco
because this definitely does not work with example 2:
```python
>>> len("""
... > Anna wrote:
... > We should bake a cake""")
46
```
(start=0, end=36 !?)
goffihas left
goffihas joined
nicoco
stripping trailing (left and right) whitespace we almost arrive at 36:
```python
>>> len("""
... > Anna wrote:
... > We should bake a cake
... """)
39
```
Alexhas left
nicoco
but to actually have 36 as in the example we need to not count newlines.
Do you think that's sensible? Whatever the conclusion is I think that XEP-0426 (Character counting in message bodies) needs to mention what we do with newlines and left and right whitespace on each line.
Alexhas joined
nicoco
also it should mention explicitely that the "char" at position "end" is included in the count (unlike python's slicing conventions btw ;))
nicocohas left
nicocohas joined
wurstsalat
nicoco: removing the fallback works fine with slicing strings, and counting chars of a quoted fallback body works fine with len(). Those are my observations so far. And yes, xep-0426 should be explicit on how to deal with newlines I think (it just works in python). I remember wild discussions about whether to include the end char or not ;) strange that it didn't land in the xep
antranigvhas left
nicoco
if it works fine with len(), then example 2 of the message replies xep is wrong :)
wurstsalat
> examples are not normative
I guess this applies here, and I would think the prefixed whitespace is for indentation only (clarity)
wurstsalat
but yes, better to be explicit
nicoco
Well, arguably for something character-counting clarity, indentation does not help clarity
nicoco
I share the same conclusion on the prefixed whitespace. But then newlines aren't counted either in this example. I wonder if that is intended or not :/
marc0shas left
marc0shas joined
wurstsalat
> Well, arguably for something character-counting clarity, indentation does not help clarity
as long as there is a disclaimer, I'm fine with the example as it is. but yeah, adding that seems like a good idea to me
mhhas left
mhhas joined
adxhas joined
wurstsalat
> if it works fine with len(), then example 2 of the message replies xep is wrong :)
for newlines, yes
lovetox
nicoco, examples are often wrong, i see the xep leaves out what is exactly counted, but its not sensible to strip anything anywhere
lovetox
its a big string, and i want the point in the string where the quote ends
lovetox
hwo many newlines the user made and where should not play a role at all
selurveduhas left
antranigvhas joined
antranigvhas left
antranigvhas joined
lovetox
counting codepoints seems the best way in my opinion, and what python does with inbuilt len
lovetox
and im sure many other languages also offer a method of counting the codepoints
emdeehas left
miruxhas left
miruxhas joined
Alexhas left
emdeehas joined
Alexhas joined
marc0shas left
marc0shas joined
MSavoritias (fae,ve)has left
nicoco
thanks for your clarifications. just in case this was not clear, I don't have a strong opinion on how this should work, but just wanted to have some more feedback since edhelas, deuill (not in this MUC) and I struggled to make sense of this fallback character counting thing, so I think it can be seen as a sign that there is room for improvement. :) I'll submit a PR soon™
Samhas left
edhelas
I'm counting the carriage return as an exra character on my side
edhelas
The best would be to add a simple example on two lines and show that the carriage return was counted as one
Samhas joined
MSavoritias (fae,ve)has joined
sonnyhas joined
nikhas joined
Beherithas joined
sonnyhas left
sonnyhas joined
wurstsalat
> Some programming languages include a string type that operates directly on Unicode code points. If these types are used, offset numbers can be used as-is in string operations. Popular examples of such programming languages are Python and Haskell.
from XEP-0426
rubihas left
rubihas joined
techmetx11has left
wurstsalat
edhelas, Movim isn't adding a newline at the fallback body's quote end. that fails in Conversations for example, as it renders the reply inside the quote
nicoco:
> wurstsalat: not sure if edhelas fixed it, but there was an issue with character counting in the fallback body
Wasn't that from a different spec? When I looked it wasn't even acceped.
marc0shas left
marc0shas joined
atomicwatchhas left
atomicwatchhas joined
antranigvhas left
Zash
So you are all just implementing the examples?
rubihas left
rubihas joined
marc0shas left
marc0shas joined
Patigahas left
nikhas joined
marc0shas left
marc0shas joined
adxhas joined
goffihas left
zawarudohas joined
larmahas joined
rubihas left
rubihas joined
goffihas joined
debaclehas left
atomicwatchhas left
deimoshas left
nicoco
I usually use the examples as test cases, but I'll adapt my strategy now that I know that they're non normative. :)
atomicwatchhas joined
atomicwatchhas left
deimoshas joined
nicoco
Zash: you're right, I had forgotten that message replies seems to refer to this protoxep: https://xmpp.org/extensions/inbox/compatibility-fallback.html which is different than xep-0428.
zawarudohas left
zawarudohas joined
Zash
IIRC the idea was to merge them?
Zash
Implementing and _deploying_ unaccepted protoXEPs ... what could go wrong?
Patigahas joined
nicoco
merging them sounds sensible to me. the current situation is confusing. I did not realize message replies referred to a protoxep when I implemented it in slixmpp...
wurstsalat
where does `urn:xmpp:feature-fallback:0` come from? registrar, where are you?
atomicwatchhas joined
Zash
Even implementing and deploying Experimental XEPs is risky, since they're subject to change at any time.
wurstsalat
larma, is there a Message Replies implementation for Dino somewhere? any plans to clarify XEP-0461 + fallback ? :)
larma
wurstsalat, partial implementation, yes. Also XEP-0461 will use the fallback element from XEP-0428 once its v0.2.0 https://github.com/xsf/xeps/pull/1188/files is merged
emdeehas left
lovetox
larma, will there be any reference to the counting informal xep?
wurstsalat
larma, thanks for clarifying! I see characters counted in the PR's example are counted including newlines :)
yes, the number in xep-0461 is currently wrong. I planned to combine this with the update once the situation with fallback was clarified (I actually do have the change locally already), but that happened to take longer than expected...
wurstsalat
larma, thanks! was there any reaction on your fallback 0.2 PR since July that I missed?
Zash
btw https://logs.xmpp.org/ supports XEP-0461
larma
for completeness, the correct end in 0461 is 38. That is the number of characters of:
`> Anna wrote:\n> Hi, how are you?\n`✎
Patigahas left
Zash
and that's how I noticed the fallback thing
larma
for completeness, the correct end in 0461 is 38. That is the number of characters of:
`> Anna wrote:\n> We should bake a cake\n` ✏
larma
wurstsalat, there is currently a vote going on in council to make me author of XEP-0428 so that lack of feedback from dave does not block this anymore. So the situation is probably going to be resolved soon.
wurstsalat
good news! :)
edhelashas left
edhelashas joined
Patigahas joined
marc0shas left
marc0shas joined
nicoco
good news indeed. thanks larma for the clarification of the count number in the xep example. also, for some reason I never realized I should not take into account the leading whitespace that is "pretty formatting" the stanza.
wouldn't it be better to "ugly format" the stanza in examples involving char count?
larma
nicoco, I think "ugly format" makes things much harder to read, but we could put some warning that this was reformatted for readability.✎
larma
nicoco, I think "ugly format" makes things much harder to read, but we could at least put some warning that this was reformatted for readability. ✏
nicoco
I think a warning would be great! for small brain amateur devs like me 😬️
zawarudohas left
zawarudohas joined
goffihas left
goffihas joined
PapaTutuWawahas left
heartyhas left
heartyhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
deuillhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
MSavoritias (fae,ve)has left
antranigvhas joined
antranigvhas left
antranigvhas joined
MSavoritias (fae,ve)has joined
Alexhas left
Alexhas joined
Patigahas left
dropshas left
selurveduhas joined
nikhas left
goffihas left
goffihas joined
deuillhas left
antranigvhas left
antranigvhas joined
antranigvhas left
antranigvhas joined
nikhas joined
xnamedhas left
xnamedhas joined
PapaTutuWawahas joined
antranigvhas left
antranigvhas joined
goffihas left
goffihas joined
deuillhas joined
goffihas left
goffihas joined
Yagizаhas left
serge90has left
serge90has joined
Kevhas joined
Kevhas left
antranigvhas left
adxhas left
goffihas left
goffihas joined
marc0shas left
marc0shas joined
rubihas left
marc0shas left
marc0shas joined
Vaulorhas left
Vaulorhas joined
miruxhas left
miruxhas joined
adxhas joined
miruxhas left
miruxhas joined
jgarthas left
rubihas joined
xeckshas left
xeckshas joined
jubalhhas joined
pasdesushihas joined
EuAndrehhas left
selurveduhas left
thomaslewishas joined
antranigvhas joined
thomaslewishas left
atomicwatchhas left
nikhas left
nikhas joined
antranigvhas left
antranigvhas joined
antranigvhas left
antranigvhas joined
antranigvhas left
rubihas left
rubihas joined
krithas left
Laurahas left
mhhas left
Matrix Traveler (bot)has left
homebeachhas left
homebeachhas joined
Matrix Traveler (bot)has joined
mhhas joined
Laurahas joined
inkyhas joined
antranigvhas joined
homebeachhas left
Matrix Traveler (bot)has left
homebeachhas joined
Matrix Traveler (bot)has joined
antranigvhas left
antranigvhas joined
deuillhas left
techmetx11has joined
larmahas left
Kevhas joined
Kevhas left
antranigvhas left
pasdesushihas left
antranigvhas joined
deuillhas joined
sonnyhas left
sonnyhas joined
antranigvhas left
Vaulorhas left
sonnyhas left
sonnyhas joined
Vaulorhas joined
sonnyhas left
sonnyhas joined
sonnyhas left
sonnyhas joined
qyhas left
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
larmahas joined
pasdesushihas joined
krithas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
wurstsalathas left
atomicwatchhas joined
wurstsalathas joined
nicoco_has joined
nicoco_has left
marc0shas left
marc0shas joined
Vaulorhas left
marc0shas left
marc0shas joined
Vaulorhas joined
thomaslewishas joined
selurveduhas joined
Laurahas left
Laurahas joined
miruxhas left
miruxhas joined
thomaslewishas left
nicoco_has joined
zawarudohas left
zawarudohas joined
nikhas left
sonnyhas left
sonnyhas joined
zawarudohas left
Vaulorhas left
xnamedhas left
xnamedhas joined
Patigahas joined
qyhas joined
Schimon_has left
Vaulorhas joined
larmahas left
mhhas left
zawarudohas joined
krithas left
krithas joined
mhhas joined
homebeachhas left
Matrix Traveler (bot)has left
homebeachhas joined
Matrix Traveler (bot)has joined
nicoco_has left
debaclehas joined
larmahas joined
Vaulorhas left
zawarudohas left
zawarudohas joined
Vaulorhas joined
Kevhas joined
Kevhas left
selurveduhas left
selurveduhas joined
inkyhas left
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
selurveduhas left
marc0shas left
marc0shas joined
nicoco_has joined
nicoco_has left
nicoco_has joined
nicoco_has left
EuAndrehhas joined
pasdesushihas left
marc0shas left
marc0shas joined
inkyhas joined
pasdesushihas joined
marc0shas left
marc0shas joined
Mario Sabatinohas left
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
deimoshas left
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
nicoco_has joined
nicoco_has left
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
nicoco_has joined
Kevhas joined
Kevhas left
marc0shas left
marc0shas joined
deuillhas left
deimoshas joined
deimoshas left
deimoshas joined
nicoco_
Do MUCs need to broadcast presences from all participants on join or is there a way for a MUC to say: ‘I have 1500 participants, but here’s the presence of the last 20 active chatters’ to clients that join it?
marc0shas left
marc0shas joined
Zash
I don't think there's a way to say it exactly like that, but there are similar optimizations possible.
Zash
Nothing prevents you from only sending the last 20 active (I would probably opt to always include moderators), and including presence when others say something.
Zash
But then you have to keep track of who's seen what
Zash
There is a thing in MUC for _not_ broadcasting presence for some roles. Usually you'd hide visitors for example.
Zash
There's also https://xmpp.org/extensions/xep-0463.html but it's about affiliations.
Zash
Was there one for presence?
jubalhhas left
nicoco_
In my context, keeping track is rather straightforward since there’s only one ‘real’ xmpp user, so I like that option. But ideally I’d also like clients to reflect how many people really are in the room, because even if I can’t get the nicks of the 1500 users, I have this info. I guess I can include it in the room subject or something.
mhhas left
zawarudohas left
Zash
Personally I feel like this goes in the "meh, save it for the MIX rewrite" ;)
Zash
I imagine in MIX this is simply a paged pubsub query
deuillhas joined
Zash
Oh, I do think there's a metadata field for participants?
Zash
"muc#roominfo_occupants": "80"
marc0shas left
marc0shas joined
nicoco_
Hehe MIX, yeah. I’d like to give MIX a try but since I also want to use my gateway in a foreseeable future, I decided to have MUCs too :). FWIW the telegram api does more or less that. It’s not ‘paged’ though, you don’t know how many participants you’ll be able to retrieve in a single request, the server decides.
Zash
That sounds funky
nicoco_
muc#roominfo_occupants is exactly what I was looking for, thanks a lot
Zash
Generally I believe all clients should handle messages from participants even if no presence was sent, tho there may be exceptions.
Zash
Otherwise they would have had trouble with the recent history included on join, if any of the speakers there left since
mhhas joined
Vaulorhas left
nicoco_
This makes sense and is consistent with my little tests so far with movim and gajim
Zash
I think there's text somewhere in '45 about sending a presence probe to get fresh presence