> on a more general point of view, I don't see the point of having this configuration field mandatory or set at all by default. We don't have such thing for mam.
I'm also curious if something like this can be done.
Sevehas left
Sevehas joined
j.rhas joined
paulhas left
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Danielhas joined
Shellhas left
Danielhas left
emushas left
karoshihas left
lskdjfhas left
gavhas left
gavhas joined
betahas joined
gavhas left
gavhas joined
gavhas left
gavhas joined
gavhas left
gavhas joined
Zash
edhelas: You can discover node configuration defaults like this: https://xmpp.org/extensions/xep-0060.html#owner-default
Danielhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
marchas left
Zash
Why don't we use XEP-0122 ranges to advertise the accepted range? I.e.
<field type="text-single" var="pubsub#max_items" label="Max # of items to persist">
<validate xmlns="http://jabber.org/protocol/xdata-validate" datatype="xs:integer">
<range min="0" max="255"/>
</validate>
<value>1</value>
</field>
j.rhas left
j.rhas joined
betahas left
mukt2has joined
Danielhas left
betahas joined
ajhas joined
Danielhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
mukt2has left
Tobiashas left
typikolhas joined
betahas left
betahas joined
typikolhas left
Danielhas left
sjaakhas left
sjaakhas joined
betahas left
debaclehas left
Danielhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
pdurbinhas joined
Danielhas left
betahas joined
mimi89999has left
betahas left
Shellhas joined
betahas joined
Douglas Terabytehas left
pdurbinhas left
mimi89999has joined
Danielhas joined
Shellhas left
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Lancehas left
Douglas Terabytehas joined
Danielhas left
ajhas left
Lancehas joined
sjaakhas left
sjaakhas joined
Neustradamushas left
Dele (Mobile)has left
Dele (Mobile)has joined
Neustradamushas joined
adiaholichas joined
stpeterhas joined
vanitasvitaehas left
betahas left
pdurbinhas joined
vanitasvitaehas joined
mukt2has joined
betahas joined
adiaholichas left
adiaholichas joined
betahas left
mukt2has left
betahas joined
Danielhas joined
stpeterhas left
Danielhas left
betahas left
mukt2has joined
mukt2has left
betahas joined
mimi89999has left
sjaakhas left
sjaakhas joined
mimi89999has joined
betahas left
Danielhas joined
mimi89999has left
betahas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Vaulorhas left
Vaulorhas joined
Lancehas left
betahas left
paulhas joined
betahas joined
mukt2has joined
Danielhas left
Danielhas joined
betahas left
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
mukt2has left
Danielhas left
betahas joined
Danielhas joined
Danielhas left
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
betahas left
betahas joined
lorddavidiiihas joined
Danielhas joined
Danielhas left
lorddavidiiihas left
lorddavidiiihas joined
betahas left
larmahas left
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Danielhas joined
betahas joined
larmahas joined
lovetoxhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
lovetox
hm it does not matter what the XEP says, it will never be able to prevent that clients change that settings
lovetox
and i thought we have fixed it already
lovetox
there is now a setting for unlimited which was not previously
lovetox
so now that there is "unlimited" there is no need for clients to set it anymore, except they want it limited intentionally like for PEP nodes
lovetox
or even better they set it all to unlimited in there publish options✎
lovetox
or even better they set it all to unlimited in their publish options ✏
betahas left
betahas joined
lovetox
its not clear to me how a client that is like movim and allows to publish microblog content would set the node to max_items=1
lovetox
that must be clearly a bug as it makes no sense
lovetox
the max_items is a per node setting
lovetox
so a client that does not support microblogging will *never* change anything on the microblogging node
lovetox
it does not matter if it sets max_items for all other nodes, like omemo, tune, activity etc
lovetox
so i dont see a problem their
lovetox
in the microblogging case there is also no need for discovery of max_items, the only thing the server must support is max_items="max"
lovetox
and if it supports it you will see if you put it in the publish options and it does not fail
MattJ
Agree, that all makes sense
MattJ
max_items is very useful in some cases
MattJ
Not usually in microblogging, sure
betahas left
lovetox
previously without "max" setting for max_items, it was a problem, because on node creation you had to make sure as client the node exists with good defaults, so you put in some number for max_items, of course other clients needed to do this also, but they didnt put in the same number
lovetox
and you didnt even know what number to put their, what the server supports and what not
betahas joined
karoshihas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
mukt2has joined
betahas left
mathijshas left
mathijshas joined
COM8has joined
mukt2has left
COM8has left
COM8has joined
goffihas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
mathijshas left
mathijshas joined
wurstsalathas joined
Vaulorhas left
Syndacehas left
marchas joined
adiaholichas left
Vaulorhas joined
andyhas joined
Danielhas left
adiaholichas joined
lorddavidiiihas left
lorddavidiiihas joined
Danielhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Syndacehas joined
winfriedhas left
winfriedhas joined
COM8has left
Danielhas left
pep.
> its not clear to me how a client that is like movim and allows to publish microblog content would set the node to max_items=1
> that must be clearly a bug as it makes no sense
I don't think Movim ever did that. There was a gajim bug though at some point that would reset microblog's max_items to 1 :p
Danielhas joined
ajhas joined
Nekithas joined
betahas joined
pep.
Also "max" doesn't seem to get much love from people from what I can see
winfriedhas left
winfriedhas joined
adiaholichas left
betahas left
emushas joined
adiaholichas joined
adiaholichas left
adiaholichas joined
Zash
A rushed hack IMO
neshtaxmpphas left
Dele (Mobile)has left
Dele (Mobile)has joined
Daniel
I think the fastening / mam summary debate brings an inner conflict between smart servers and dumb message routing servers to the surface that has been boiling for years now.
It's super hard (I'm afraid impossible) to have smart servers in a generic form
pep.
If you agree there's a need for such a feature maybe that can be fixed
pep.
Zash ^
Dele (Mobile)has left
Dele (Mobile)has joined
pep.
(It's not like anybody was using it already)
betahas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Dele (Mobile)has left
j.rhas left
winfriedhas left
winfriedhas joined
betahas left
Dele (Mobile)has joined
sjaakhas left
sjaakhas joined
betahas joined
Tobiashas joined
j.rhas joined
sjaakhas left
sjaakhas joined
sjaakhas left
Dele (Mobile)has left
Dele (Mobile)has joined
betahas left
lskdjfhas joined
sjaakhas joined
Dele (Mobile)has left
Dele (Mobile)has joined
mukt2has joined
sjaakhas left
sjaakhas joined
lovetox
how is this a rushed hack?
lovetox
i dont see another solution, and i heard not of any argument why max_items=max does not what it intends to do
lovetox
pep., why would you say it gets no love from people?
lovetox
because its not implemented instantly?
Dele (Mobile)has left
lovetox
its only needed for very few cases right now in xmpp
lovetox
bookmarks2 and mircoblogging
lovetox
thats it
MattJ
lovetox, the main complaint we have is shoving a text string into a field that was previously an integer
mathijshas left
mathijshas joined
adiaholichas left
lovetox
ok but that has nothing to do with the intention of the feature
MattJ
Sure, no, I agree with the intent
Alexhas left
lovetox
yeah -1 would maybe be better
lovetox
but i have no experience how much problems that generate on the server side if its now a string/int
lovetox
i know at client level i dont care
lovetox
hm actually ...
MattJ
It depends on the server
lovetox
what if we put that into a form like a node config
lovetox
but we only have text fields there
lorddavidiiihas left
MattJ
In previous versions of Prosody it would have been ok, we had custom validation code everywhere and we could have tweaked that to be even more custom
lovetox
there are no int / number fields
lovetox
so it does not care either
MattJ
But we cleaned up the custom stuff and implemented standard validation of fields where it made sense
MattJ
But there is no standard data type for "sometime int, sometimes a string 'max'"
lovetox
no but its always a string isnt it
lovetox
you have to take the string, and convert it to an int
lovetox
and this works or it doesnt
Dele (Mobile)has joined
MattJ
Correct, so it must be something convertible to an int
lovetox
and if it doesnt, you test if its "max"
lorddavidiiihas joined
MattJ
Sure, as I said, we can litter the code with custom hacks like that
MattJ
But we try not to
lovetox
yeah i see how a generic validation code cant handle that
lovetox
its not even int/string is allowed
lovetox
its int and one single string is allowed
MattJ
and I'll bet this isn't the only option where this feature makes sense
MattJ
It's just the one that is being focused on right now
lovetox
the proposal from Daniel was actually some unicode char, then this was discussed and it was changed to max
lovetox
i dont know if -1 came up in the discussion
MattJ
-1 would have been fine with me from an implementation perspective
Dele (Mobile)has left
MattJ
From a protocol perspective it would probably be cleaner to define a type xmpp:integer-or-max or something at https://xmpp.org/registrar/xdv-datatypes.html
MattJ
which can still be done
MattJ
But I have been working on other things
mukt2has left
winfriedhas left
winfriedhas joined
MattJ
Also I don't think this allows the client to actually discover the limit, does it? Zash's proposal does
MattJ
Even if the client can't do anything about the server limit, it might be good to inform the user that posting a new post will remove the old one
Danielhas left
Danielhas joined
MattJ
We might also want an option to disable that behaviour (reject the new item if the node is full instead)
pep.
yeah the form thing above looks nice
pep.
That forces the client to fetch the config though (kinda moot for publish-options no?)
MattJ
Yeah, maybe
winfriedhas left
winfriedhas joined
winfriedhas left
winfriedhas joined
Zash
integer-or-max (throw in "min" too for good measure) would be fine
Zash
also, limits could be advertised somewhere, like the limit on http upload size
mathijshas left
mathijshas joined
pep.
in disco?
Zash
A form in disco#info at your account seems appropriate
Dele (Mobile)has joined
Danielhas left
Danielhas joined
adiaholichas joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
Dele (Mobile)has left
Danielhas left
Danielhas joined
Danielhas left
Danielhas joined
Dele (Mobile)has joined
Vaulorhas left
Vaulorhas joined
Danielhas left
Danielhas joined
Danielhas left
Danielhas joined
Danielhas left
mathijshas left
mathijshas joined
Danielhas joined
Danielhas left
Danielhas joined
adiaholichas left
adiaholichas joined
Dele (Mobile)has left
ajhas left
Danielhas left
Danielhas joined
lorddavidiiihas left
lorddavidiiihas joined
Danielhas left
Danielhas joined
sjaakhas left
sjaakhas joined
adiaholichas left
adiaholichas joined
Dele (Mobile)has joined
sjaakhas left
sjaakhas joined
sjaakhas left
sjaakhas joined
lovetox
i would expect the server to reject it
lovetox
and not silently start deleting stuff
MattJ
That means PEP will be permanently broken :)
mimi89999has joined
MattJ
unless you issue a delete before every publish
MattJ
tune change == delete old tune, publish new tune
lovetox
no, it should only reject new items
!XSF_Martinhas left
lovetox
it should allow overwriting existing
lovetox
thats why everyone should use a SingletonNode
sjaakhas left
lovetox
so max_items should actually mean, max different ids
lovetox
so a server rejecting all new ids except the existing one
MattJ
I'd be happy with that
MattJ
There are still many use-cases where deleting the oldest item does make sense
MattJ
But I think it needs to be configurable
lovetox
is this written in the xep that the server has to delete old items when max_items=1?
lovetox
or is it not defined
MattJ
> Note: If the service or node is configured so that there is a maximum number of items cached at the node and the maximum is reached when an item is published, the service MUST delete one of the existing items. It is RECOMMENDED for the service to follow the "first in, first out" rule and delete the oldest item. Depending on node configuration, deletion of an existing item MAY result in sending of a delete notification to the subscribers.