-
lovetox
hm about message correction, if i dont find the original that should be corrected, is it acceptable to drop the message?
-
lovetox
or lets say not drop, but at least not display like a normal message
-
lovetox
i find it not easy to treat a correction as "normal" message (so not a correction) because the original is not there, but suddenly later if i receive the original, treat the same message differently
-
lovetox
currently my plan was to have a "message" table, and a "corrections" table, i store all correction content only in the corrections table
-
lovetox
but that means if i load messages from the messages table, and the original is not in the table, corrections will also not get loaded
-
lovetox
resulting in basically a correction which the user received but never displayed
-
lovetox
i wonder now if this would be OK, or maybe there is a smarter database setup
-
singpolyma
That seems fine to me. Certainly easier than the other way
-
lovetox
yeah the more i think about it, it seems like the only sane way, especially if you want to have a setup where you request MAM backwards on user request
-
atomicwatch
I have a question, I'm trying to get MUC MAM to work for profanity but I'm getting 0 messages for my requests so I'm wondering if I'm doing something wrong. ``` <iq id="9aeeDp6B4jvseT4a2a0f157f8dc4d347b06d945b86306f32096a316" type="set"> <query xmlns="urn:xmpp:mam:2"> <x xmlns="jabber:x:data" type="submit"> <field type="hidden" var="FORM_TYPE"> <value>urn:xmpp:mam:2</value> </field> <field var="with"> <value>operators@muc.xmpp.org</value> </field> </x> <set xmlns="http://jabber.org/protocol/rsm"> <max>10</max> </set> </query> </iq> ``` This is what my request looks like
-
lovetox
remove the with
-
atomicwatch
But I only want messages from that muc
-
lovetox
thats why you send the iq to the MUC or not?
-
lovetox
i mean ok true you do not
-
lovetox
thats also an error
-
lovetox
the IQ needs to go to the archive
-
lovetox
not to your account jid
-
lovetox
its only to your account, if you want messages from your account
-
atomicwatch
I see, how do I do that?
-
lovetox
<iq id="9aeeDp6B4jvseT4a2a0f157f8dc4d347b06d945b86306f32096a316" type="set" to=operators@muc.xmpp.org >
-
lovetox
and lose the "with" filter, its useless for mucs
-
atomicwatch
Ok thank you very much
-
lovetox
with the "with" filter you could query your account MAM, and request only messages for a specific conversation
-
lovetox
but in a MUC all messages are addressed to the MUC JID
-
atomicwatch
It worked thank you very much. I was trying to find information in the MAM XEP but I don't see the to property there. Could I ask where I would be able to find this kind of info next time?
-
lovetox
puh .. i guess you need a bit of rfc knowledge for this
-
lovetox
a <iq> without "to" attribute
-
lovetox
means implicit <iq to=youraccount@domain.org>
-
Zash
I would say so.
-
lovetox
so every iq has implicit a "to" attribute if you dont overwrite it
-
lovetox
if you now read https://xmpp.org/extensions/xep-0313.html#archives_muc
-
lovetox
> A MUC service allowing MAM queries for a room MUST expose the MAM archive on the room's bare JID.
-
lovetox
then you would deduce, the iq needs to go to the JID where the archive is hosted
-
lovetox
the archive is hosted on the bare room JID , so < iq to="bareroomjid">
-
atomicwatch
Ah I see, for some reason I thought that meant I had to put it in the with property. Thank you I'll try reading the XEPs more carefully next time
-
lovetox
no worries, this comes with experience, just ask here and someone will help :)
-
lovetox
with <iq> in general you can ask yourself, where does it need to go? whats the target, from where do i want to request something? Often its your own account jid, your own server basically, and then in the examples the "to" attribute is missing because its not necessary, but that does not mean you can not address this <iq> to anyone else out there.
-
Zash
In theory, if group messages were stored in the account archive, the above query would have worked. But it doesn't because MUC is awkward and it would be so messy to store in the account archives, easier for the MUC to do it itself.