-
paria
hi everyone, how can i have my messages archive for specific user?
-
paria
😥
-
moparisthebest
paria, can you be more specific
-
paria
i'm using xmpp server to create a chat app one to one
-
paria
already i have all messages archive, but i want to filter it by specific jabber id
-
paria
the question is how to make query to get archive just for user X or Y or ...
-
moparisthebest
a specific JID already only has access to their own archive though, right?
-
paria
how?
-
paria
do you have any example?
-
paria
moparisthebest
-
Daniel
paria: have you read xep313?
-
paria
yesss
-
paria
but not working
-
paria
<body rid="3487398716" sid="104eace1e302ddcce25e726868f0af7d91589a18" xmlns="http://jabber.org/protocol/httpbind"><iq id="a2" type="set" xmlns="jabber:client"><query xmlns="urn:xmpp:mam:2"><with>paria@ejabberd</with></query></iq></body>✎ -
paria
<body rid="3487398716" sid="104eace1e302ddcce25e726868f0af7d91589a18" xmlns="http://jabber.org/protocol/httpbind"> <iq id="a2" type="set" xmlns="jabber:client"><query xmlns="urn:xmpp:mam:2"> <with>paria@ejabberd</with> </query></iq></body> ✏
-
Daniel
Not working how?
-
paria
this is my created xml
-
paria
based on xep313✎ -
paria
based on xep313 for filtering ✏
-
Daniel
Compare that to example 6
-
paria
ok
-
paria
Daniel is example 6 the server response? right?
-
Daniel
no
-
paria
it is my xml to send??
-
paria
r u sure?
-
paria
i'm completly confused✎ -
Daniel
you might want to re-read section 4 of the xep
-
paria
i'm completely confused ✏
-
paria
ok i'll
-
paria
Daniel r u there?
-
Daniel
paria, yes
-
paria
i'm getting reponse from server like this
-
paria
<iq xmlns =" jabber:client " xml:lang =" en " to =" admin@ejabberd/31559446851458370303810 " from =" admin@ejabberd " type =" result " id =" archive2 " > <query xmlns =" urn:xmpp:mam:2 " > <x xmlns =" jabber❌data " type =" form " > <field var =" FORM_TYPE " type =" hidden " > <value > urn:xmpp:mam:2 </value > </field> <field var =" with " type =" jid-single " label =" User JID " / > <field var =" start " type =" text-single " label =" Search from the date " / > <field var =" end " type="text-single" label <iq xmlns =" jabber:client " xml:lang =" en " to =" admin@ejabberd/31559446851458370303810 " from =" admin@ejabberd " type =" result " id =" archive2 " > <query xmlns =" urn:xmpp:mam:2 " > <x xmlns =" jabber❌data " type =" form " > <field var =" FORM_TYPE " type =" hidden " > <value > urn:xmpp:mam:2 </value > </field> <field var =" with " type =" jid-single " label =" User JID " / > <field var =" start " type =" text-single " label =" Search from the date " / > <field var =" end " type =" text-single " label =" Search until the date " / > </x> </query> </iq> =" Search until the date " /> </x> </query> </iq>✎ -
paria
1 momment ✏
-
Daniel
paria, in response to what request?
-
paria
getArchive() { let archive = this.state .$iq({ type: "set", id: "archive1" }) .c("query", { xmlns: "urn:xmpp:mam:2" }) .c("with") .t(this.state.connection.jid); console.log("history", archive); this.state.connection.send(archive.tree()); }✎ -
paria
this
-
paria
getArchive() { let archive = this.state .$iq({ type: "get", id: "archive1" }) .c("query", { xmlns: "urn:xmpp:mam:2" }) .c("with") .t(this.state.connection.jid); console.log("history", archive); this.state.connection.send(archive.tree()); } ✏
-
Daniel
paria, can you show me the xml?
-
paria
yes
-
paria
w8
-
Zash
What library are you using? Is there no MAM support?
-
paria
<body rid="1446034458" sid="46bada5449ccb61b52966b424f7ea8ee9ecbc879" xmlns="http://jabber.org/protocol/httpbind"> <iq id="archive1" type="set" xmlns="jabber:client"><query xmlns="urn:xmpp:mam:2"/></iq> <iq id="archive2" type="get" xmlns="jabber:client"><query xmlns="urn:xmpp:mam:2"><with>paria@ejabberd</with></query></iq> </body>
-
lovetox
paria, this query is wrong
-
lovetox
look at example 6 of the XEP
-
paria
Zash strophejs
-
Zash
Pretty sure someone wrote a MAM plugin for that
-
paria
https://github.com/strophe/strophejs-plugin-mam
-
paria
this is the plugin but it has some errors
-
paria
Daniel i should create example 6 xml?
-
lovetox
yes paria as the example description tells you
-
paria
now the server response is like example 6
-
lovetox
"Querying for all messages to/from a particular JID"
-
lovetox
where do you got the idea to do a <with>paria@ejabberd</with>
-
lovetox
this is nowhere to be found in the xep
-
paria
in one document which i read before,
-
paria
but it's wrong
-
Daniel
just follow the examples in the XEP
-
lovetox
do servers do that autoreply on preapproval of roster additions the RFC6121 mentions?
-
lovetox
https://tools.ietf.org/html/rfc6121#section-3.1.3
-
Ge0rG
I wouldn't be surprised if servers didn't implement that at all
-
kevin
i hope everyone is having a wonderful day
-
allie
kevin:
-
kevin
whats up allie
-
allie
oops that was an accident lol
-
allie
nada, you?