alliehi all :) this might be a silly question... but I'm playing around with trying to write a component (or something to that effect). anyway, is there any guidance/suggestions on when something should be a component and when it should be client/bot?
allietrying to figure out how all this stuff sorta fits together
bhaveshsguptahas left
ajhas joined
bhaveshsguptahas joined
bhaveshsguptahas left
bhaveshsguptahas joined
bhaveshsguptahas left
bhaveshsguptahas joined
lksjdflksjdfhas left
lksjdflksjdfhas joined
bhaveshsguptahas left
bhaveshsguptahas joined
͡ ͡has joined
͡ ͡has left
lksjdflksjdfhas left
alliehas left
lksjdflksjdfhas joined
Danielhas left
Danielhas joined
Danielhas left
lksjdflksjdfhas left
bhaveshsguptahas left
bhaveshsguptahas joined
ajhas left
bhaveshsguptahas left
bhaveshsguptahas joined
Danielhas joined
Danielallie, as a matter of fact i did write something on that: https://github.com/xmpp-docs/simple-muc-component-java/blob/master/README.md
Danielthe rest of the tutorial isn’t done. but the client vs component section is
linkmauvehas joined
lovetoxhas joined
Alexhas joined
rionhas left
rionhas joined
bhaveshsguptahas left
bhaveshsguptahas joined
larmahas left
larmahas joined
bhaveshsguptahas left
bhaveshsguptahas joined
ajhas joined
bhaveshsguptahas left
bhaveshsguptahas joined
͡ ͡has joined
͡ ͡has left
bhaveshsguptahas left
bhaveshsguptahas joined
pep.How would I know I've received a directed presence from someone?
pep.I start receiving presences from somebody not in my roster? that's it?
pep.when do I stop receiving directed presences? What does the sender need to do? Send an unavailable presence?
lovetoxyes
pep.ok
lovetoxhm but i dont know what the server actually does
lovetoxif i send a directed presence, does the server then route all my status changes to that contact from that moment on?
pep.I guess so?
lovetoxor is it like i have to take myself care of all directed presences
lovetoxbut what if i send a contact a different show/status then my other contacts
lovetoxthis is totally a use case
lovetoxmaybe Zash knows ^
ZashYou get to do presence broadcasts manually for directed presence.
pep.Ah
pep.hmm so there's less privacy issues than I though
pep.hmm so there's less privacy issues than I thought
pep.I thought the server would actually forward all my status changes etc.
lovetoxyeah what i thought, everything else would not work
lovetoxone of the usecases for directed presence is, that i can show a different status/show to a contact
lovetoxso this would no fly if the server just broadcasts all my status changes
pep.For me here it's the PEP updates use-case. I'm trying to come up with an update on that thread
lovetoxi didnt really get that, you want notifications from a contact not in your roster?
pep.https://mail.jabber.org/pipermail/standards/2019-August/036367.html that's the thread, and yes
pep.I'd want to allow people who can see my presence after me sending a directed presence, receive PEP updates for nodes they've expressed an interest for (+notify), for items with access_model=open
pep.Hmm, that means I also need to have the other side's presence though no? :/
pep.To get the caps
lovetoxnot you
lovetoxthe server
lovetoxand he can always query the contact if he needs to
pep.Are caps available to anybody who asks?
lovetoxyes
pep.ugh
lovetoxi mean depends on your client, a client could as well not answer a disco info request
pep.You can ask a barejid no?
pep.Or always fulljid?
lovetoxi guess you can ask a barejid
lovetoxbut you will always get a answer from a fulljid
lovetoxin the contact case
pep.You'll get an answer from a random fulljid?
lovetoxno you cant get an answer from a fulljid
pep.> lovetox> but you will always get a answer from a fulljid
lovetoxserver will always add a from with a resource
lovetoxah sorry
lovetoxthought about barejid
lovetoxyes probably from all fulljids currently online
lovetoxor do IQs to contacts always need to be to fulljid?
lovetoxi dont know the routing rules
lovetoxwhere does a server route a IQ with no resource
lovetoxcould be he doesnt at all
pep.Ok that'd be what I expect I guess. Bob sends directed presence to Alice, requests Alice's caps on the barejid, it happens one of Alice's devices has foo+notify, and Bob has a foo node with open items
pep.So Bob's server pushes that to Alice
lovetoxZash ^
lovetoxbut pep. i think you get yourself in a very complex situation that will not work good all the time
lovetoxits easier to just add the contact to your roster
pep.Yeah that won't happen :x
pep.Not for me at least
lovetoxso how long do you send directed presences?
lovetoxsay you have a convo with a contact not in your roster
lovetoxyou do your presence thing
lovetoxnow you restart your client, what now?
pep.Yeah, read the thread on standards, that's also one of my questions
lovetoxagain sending directed presence? for how long goes that on? until the end of time?
Danielthe end of the session
pep.Sure, probably
lovetoxDaniel why though? one can argue that the chances of a device switch within a session is near zero
lovetoxyou dont need notifications for that
pep.Except when it's not
pep.And then you get users complaining
lovetoxyeah sure, getting notifications only until you restart your client once, sounds like its surley work fine
pep.As I don't add people in my roster that easily I suspect it'll be the case for me as well
lovetoxwhat you need is a local roster
lovetoxlocal roster of contacts which are not in your server roster
Danielpep., but why are you fine with having your client (automatically) send directed presence for all open conversations but not simply asking for mutual presence sub?
lovetoxthen you can delete a contact from your local roster once you dont need him anymore, and can stop the presence thing
pep.Daniel: it's not permanent right?
pep.I can close the tab and be done with it
Danielif privacy is a concern (which i get but might not share) subbing to pep seems like the only option
lovetoxyeah why send directed presence, and not just sub to the node?
lovetoxthose subscriptions you could track and manage
pep.Not sure yet.
pep.lovetox: tracking-wise it's the same
pep.I need to know when to unsubscribe, same as I need to know when to send unavailable
lovetoxas i suggested make something like a local roster
pep.Sure, that's an implementation detail
lovetoxthen you know for all contacts in that local roster you can do X
lovetoxlike sub on start of the session
lovetoxor send directed presence
lovetoxbut you thought that only through into one direction
lovetoxif you want to send messages
lovetoxbut the other way around will break easily
lovetoxonly if you send someone your presence, it does not mean he gets updates when you change your devices
lovetoxor does it Oo?
pep.When to subscribe is fine I guess. When to unsubscribe is a bit more annoying but also doable. When tab closes, on disconnect, and later when seeing a foreign PEP update
lovetoxno i dont think so
pep.No it's not a thinf
pep.No it's not a thing
pep.I was going to maybe change that in PEP, just trying to see if it's worth it or not
lovetoxstill see no benefit in this solution, i just add a contact to my roster and delete him if i dont want to talk anymore
lovetoxthats 2 clicks
lovetoxand zero implementation work
pep.It's a bit less of a bother for a client to just send a directed presence I guess
pep.Sure you still have to track who you're sending to
pep.And you go through roster subscription flow and that's quite a pain for the user
lovetoxno you are trying to implement a solution that will not work 100% of the time, and needs code changes in your client, and i heard no gain sofar
lovetoxthen make the roster subscription flow easier? actually it should just be one click
lovetoxthere is no need to bother the user with more
ZashSo much text
pep.Then you need to go to your roster when you're done and delete it :x
Zashlovetox [13:14]:
> i guess you can ask a barejid
you can't
pep.Brb
pep.That's annoying
Daniel i mean both managing directed presence and managing pep subscription seem like a pain in the ass
Danielhowever one of those is available now without changes to the XEP
Danieland to servers
lovetoxpep. then add something so its not annyoing
lovetoxlike a button "Add contact temporary to roster"
lovetoxwhich means the client will delete it automatically from the roster after X days
lovetoxor at the start of the next session
lovetoxseems much nicer to go the direction of automating this adding/deleting roster stuff
Danielwell there is also an alternate universe where roster means 'open conversations' (and not phone book)
Danielthat then would also act as a way to sync 'open conversations'
Danieland you wouldn’t publish you entire 'address book' to the server but only 'open conversations'
Danielso if you close a tab you remove that person from the roster
pep.When do we finish that inbox xep
pep.Ok so.. conclusion, we manually subscribe to PEP and that's it?
Ge0rGlovetox: never touch my roster without asking me. It's *my* roster, not yours.
Ge0rGpep.: BTW, how do you synchronize that state between multiple clients?
pep.You don't? Every client does its own magic :/
pep.Not that I wouldn't like to have that
pep.That's an interesting question though
Ge0rGIf only we had account side pep subscription management
Danielthe second half of my Quicksy talk was about all that
Danielnobody cared back then :-)
pep.Alice receives a message from Bob (who isn't in her roster) on her mobile and her desktop at the same time. She sees the message on the desktop but closes the tab and takes the discussion on the mobile because she's moving.
pep.What do I do now.. One device will probably unsubscribe PEP, the other still needs it
Danieli mentioning that because i already went to the thought process
lksjdflksjdfhas joined
pep.Daniel, with multiple devices I'll have the same issue as bookmarks though..
pep.I don't have the same usage of my phone and poezio :/
pep.And then it's useless again
Danieltrue
pep.Unless the XEP has profiles etc., but I doubt we'll go that way
pep.Also if you use that XEP with a device and then you forget about it, you'll be subscribed to all the open discussions for eternity :p
pep.(with profiles)
pep.Currently, if we choose to subscribe to PEP manually, I see easy fails with multiple devices as I mentioned above
pep.One will subscribe, you'll receive a notification, another one will unsubscribe because they don't know who that's coming from, etc.
Danielyou can probably sub with your full jid to avoid that
pep.hmm
pep.That's handled by your server then? Or do all these queries get to the recipient's server?
Danielbut also direct sub will only nofiy you when the change occurs while you are online
pep.(As in your server subscribes for you with your barejid, and only sends to the subscribed fulljib)
larmahas left
larmahas joined
pep.True
Danielor we put that in MAM :-)
pep.:/
pep.What don't we put in MAM nowadays
Ge0rGMUC.
DanielOnly speak for yourself
pep.I want to say <presence/> :-°
ZashChat states in presence?
Ge0rGChat states make up a frighteningly big part of my MAM download
ZashWhat
ZashI remember that being the case, so I made mod_mam strip them by default (+ configurable whatever namespaces)
Ge0rGZash: also empty messages from jitsi that only contain a thread
Ge0rGZash: I'll run another sync job and give you the Smack class names of the elements in body-less messages
ZashGe0rG: Does it send it like that?
Zashthread + chat-state I can believe, but only thread? wut
Ge0rGZash: all I have is MAM
Ge0rGSomebody broke the xml log in poezio, and android hardly remembers the last half an hour
pep.Ge0rG, it's back on master
pep.For 2 weeks now
Ge0rGpep.: that's less than my poezio uptime.
Ge0rGSince we fixed the memory leak, there are no excuses left for restarting. Okay, actually there's one left, when my ISP fails and then the automatic reconnect fails as well.
ZashWhy are there carbons in my archive?
Zash35% of all xmlns attributes are chat states
Ge0rGZash: reduce your carbon footprint!
Ge0rGAs opposed to Carbons, MAM won't tell you if a message is outgoing or incoming. This is a real consistency problem with self messaging.
Ge0rGZash: how is this possibly a thing that a server operator would want to care about?
ZashHow am I supposed to know beforehand what should be archived and what shouldn't?
Ge0rGRead all the XEPs. Make informed decisions. Bitch on standards@.
ZashAnd then things change again.
Ge0rGZash: you can't have config variables for all the things that might change.
ZashThe list of plugins is the ultimate config variable for all things that will change.
Ge0rGAnd you have SCM for the code, with one central repository. Imagine thousands of server admins trying to keep up with the latest and greatest value for each config variable.
Ge0rGmod_mam_smart?
ZashActually it should just store everything and then do filtering when you query.
Ge0rGPlease don't.
ZashAnd whatever happened to chat states in presence?
Ge0rGIt should do filtering based on the advertised client features, yes, but it really shouldn't store ephemeral junk like chat states
Ge0rGZash: nothing yet
Ge0rGZash: write the XEP!
ZashMy own server strips receipts, chat markers, hints, .... fight me.
pep.Right, you don't need hint to store in MAM once they're in MAM. Shouldn't that be the default? :p
pep.(not to store them)
ZashStrip chat states. Realize archive is 90% chat markers. Strip those, etc.
ZashAsk for 50 messages, get two with actual content.
ZashMuch fun.
Ge0rGZash: receipts and markers actually make sense
pep.Zash, do you also not store messages that are empty after you've stripped things?
Zashpep., yes, that's how it knows there wasn't anything useful in them
pep.k
ZashAnd why a message with only a <thread> could make it in there, if it also had a chat state
Ge0rGZash: why don't you store the unstripped version if the stripped one isn't empty?
ZashSmaller storage footprint?
ZashLess data to send when you query
Ge0rGAlright
Ge0rGJust that you might end up with only a thread element in MAM
Ge0rGAnd you shouldn't completely strip that out
ZashWhat would you do do with a thread and a chat state?
pep.You should have a smarter module and remove stuff that doesn't make sense anymore once you've processed all you wanted to remove :P
ZashI should say patches welcome.
pep.:)
pep.post_post_process_messages
Ge0rGmod_aggregate_receipts_and_markers
pep.mod_mam_plus
bhaveshsguptahas left
bhaveshsguptahas joined
ZashIsn't that the great plan already? MAM2
pep.Not mam:2 right
ZashNo
ZashMAM reimagined as some sort of multidimentional magic thing where each message has its own archive of addon-data
pep.Yeah I know. Andrew Nenakhov even ranted about that on standards yesterday?
ZashHm? I'm referring to last Summit discussions
ZashNo wait, not an archive per message. An archive per extension per message.
pep.Yeah, that was also discussed a few days ago in xsf@, alongside fastening
Ge0rGZash: I end up with more worthless messages in MAM: ^
Ge0rGZash: you can't strip <x/> or <origin-id/> from stored messages, but you can ignore them for the sake of storing messages.
Ge0rGZash: so you need that split-logic after all
ZashDoing other things and/or nothing today. Please open an issue and write down the requirements, without mixing in different issues.
bhaveshsguptahas joined
linkmauvehas left
linkmauvehas joined
bhaveshsguptahas left
bhaveshsguptahas joined
bhaveshsguptahas left
bhaveshsguptahas joined
Lancehas left
ajhas left
Astrohas joined
alliehas joined
allieDaniel: thanks for the link :) Although I'm still not 100% clear on when one should implement one or the other, unless the component is adding additional XEPpy features to the server. In those cases it seems it makes perfect sense. I guess it's a little confusing since, in the past, people have created components for things that didn't really need components.
allieI just want to write something that provides weather information to me and other users when requested. That seems like it'd be in bot territory, since it doesn't need to modify JIDs, isn't extending the server, etc.
Ge0rGallie: then write a bot
allieyeah prolly what I'll do
alliemost of that was kinda thinking outloud :)
Ge0rGYou make a component if you want to bridge to a different chat network
allieright, or I guess maybe pubsub-type stuff.
pep.Ge0rG, that's not the only use-case, definitely.
pep.You make a component if you need another addressing namespace(?)
pep.You make a component if you need another addressing space(?)
Ge0rGIs there a reason to do pubsub on a component instead of on a bot?
Ge0rGpep.: yes, that's the abstract way to say it. But where else do you actually need that?
pep.I guess a component is also easier to bundle with the server usually
pep.You could very well have a pubsub bot running on the server? :p
allieor like I was saying earlier if you're extending server functionality with another XEP
pep.Ge0rG, though, a bot wouldn't appear in the server's disco#items would it?
pep.Maybe not impossible to add it there.
allieI've been an xmpp user off and on for years. but never tried to make anything for it. so that's why I'm still feeling my way through the different parts, and if you're going by how others have implemented things, I guess they've sometimes implemented things in certain ways that may have been better in other ways
Ge0rGpep.: ask jonas’ if you really dare
pep.:D
pep.allie, sure some ways might be more appropriate than others :)
pep.Ge0rG, just like you can have a MUC component on a barejid? :)
Ge0rGpep.: yes.
ZashAha, found the post I was reminded of:
https://metajack.im/2008/08/04/thoughts-on-scalable-xmpp-bots/
pep.So why would you make a component if you don't need the addressing space?
pep.Can you call a component that doesn't make use of that space a bot?
ZashYou can call it whatever you want, it's all arbitrary anyways
allieI guess it's more that clients have lots of baggage that may not be appropriate for a component, whereas a component may as well be an entirely separate xmpp server that manages all its own stuff internally
pep.Zash, not sure why the roster would be a problem at all. Just don't use it? :/
pep.The component still needs to keep a mapping anyway
ZashYou can cheat if you do it yourself
pep.Right
pep.Also nothing says a component has to have only one role, right?
pep.(That is, MUC, pubsub, user domain?!, etc.)
pep.mod_pubsub could even be loaded on the vhost right?
ZashRemember the special user@host component thing Prosody supports?
Ge0rGpep.: some client libraries seem to have very strong opinions on that
pep.Ge0rG, open bugs!
Zashpep., as long as they don't conflict in the namespaces and stuff they use. Eg disco gets funky sometimes.
Ge0rGpep.: BTDT
pep.hmm right disco
pep.I would have liked this <feature><feature/></feature> thing to happen :P
Zashpep., but you're right, there's no problem with having pubsub and stuff on a normal host. MUC is problematic tho, since it overloads nodeparts
pep.yeah
pep.But I'm sure users and rooms can coexist. They can find a way to live in peace
ZashWhy can't users be rooms? And why can't rooms join users?
pep.Such a philosophical question
ZashLike DMUC (?) where MUCs join other MUCs and you get IRC-style trees
pep.I was actually planning to look into that
pep.That is, adding it on the TODO
Ge0rGA client needs different code paths for messages from a MUC vs from a user. You can't have both on the same bare JID
allieZash: MUCs all the way down...
Alexhas left
pep.A room cannot be on a FullJid right? Otherwise there's no place for nicks anymore(?)