jdev - 2020-01-15


  1. asterix has left
  2. asterix has joined
  3. asterix has left
  4. asterix has joined
  5. wurstsalat has left
  6. asterix has left
  7. asterix has joined
  8. asterix has left
  9. asterix has joined
  10. asterix has left
  11. asterix has joined
  12. asterix has left
  13. asterix has joined
  14. asterix has left
  15. asterix has joined
  16. asterix has left
  17. asterix has joined
  18. asterix has left
  19. asterix has joined
  20. asterix has left
  21. asterix has joined
  22. moparisthebest has left
  23. moparisthebest has joined
  24. bhaveshsgupta has left
  25. bhaveshsgupta has joined
  26. asterix has left
  27. asterix has joined
  28. asterix has left
  29. asterix has joined
  30. asterix has left
  31. asterix has joined
  32. asterix has left
  33. asterix has joined
  34. bhaveshsgupta has left
  35. bhaveshsgupta has joined
  36. paul has left
  37. bhaveshsgupta has left
  38. bhaveshsgupta has joined
  39. bhaveshsgupta has left
  40. bhaveshsgupta has joined
  41. kikuchiyo has left
  42. bhaveshsgupta has left
  43. strar has left
  44. strar has joined
  45. strar has left
  46. strar has joined
  47. bhaveshsgupta has joined
  48. strar has left
  49. strar has joined
  50. kikuchiyo has joined
  51. bhaveshsgupta has left
  52. bhaveshsgupta has joined
  53. kikuchiyo has left
  54. bhaveshsgupta has left
  55. bhaveshsgupta has joined
  56. kikuchiyo has joined
  57. kikuchiyo has left
  58. kikuchiyo has joined
  59. kikuchiyo has left
  60. bhaveshsgupta has left
  61. bhaveshsgupta has joined
  62. bhaveshsgupta has left
  63. bhaveshsgupta has joined
  64. paul has joined
  65. lovetox has joined
  66. bhaveshsgupta has left
  67. bhaveshsgupta has joined
  68. lovetox has left
  69. kikuchiyo has joined
  70. kikuchiyo has left
  71. sonny has left
  72. Meta Bergman has left
  73. Meta Bergman has joined
  74. kikuchiyo has joined
  75. sonny has joined
  76. strar has left
  77. kikuchiyo has left
  78. lovetox has joined
  79. pulkomandy has left
  80. strar has joined
  81. kikuchiyo has joined
  82. pulkomandy has joined
  83. wurstsalat has joined
  84. asterix has left
  85. asterix has joined
  86. kikuchiyo has left
  87. lovetox does it make sense to try PLAIN on a host from xmpp-client?
  88. lovetox or does xmpp-client always mean START TLS
  89. MattJ PLAIN? The SASL mechanism?
  90. lovetox no, i mean no TLS
  91. MattJ Or do you mean a totally unencrypted connection?
  92. lovetox unencrypted
  93. MattJ It doesn't make sense to ever try an unencrypted connection
  94. Kev If what SRV resolves to doesn't offer TLS, it's a matter of local policy whether you'll continue without it.
  95. lovetox try is the wrong word
  96. lovetox the user wants to connect PLAIN, do i resolve xmpp-client and try there
  97. MattJ Yes
  98. lovetox or do i just resolve domain
  99. lovetox and use 5222
  100. MattJ You would still obey SRV
  101. Kev You always use SRV unless the user explicitly asks you not to (if you support such a thing).
  102. lovetox i wondered because xmpps-client is explicitly for DIRECT TLS
  103. lovetox so even if the user wants PLAIN, i would never try there
  104. lovetox i wondererd if xmpp-client is explicitly for START TLS
  105. Kev Calling it PLAIN is somewhat misleading. PLAIN is a SASL mechanism.
  106. Kev You mean 'The user asks to never use TLS', I think?
  107. flow lovetox, no, xmpp-client is for the TCP binding of XMPP defined bin RFC6120
  108. lovetox yes, the user asks to connect unencrypted
  109. lovetox ok good, thats what i wanted to know
  110. lovetox so i still have to resolve xmpp-client, before i go the domain:5222 fallback route
  111. MattJ Yes
  112. flow lovetox, that is what is written down in rfc6120 ;)
  113. lovetox i wondered why did we add websocket and bosh into a TXT record
  114. lovetox why not xmpp-client-websocket._tcp ..
  115. MattJ Because they need URLs
  116. lovetox ah its not allwoed
  117. lovetox ok
  118. lovetox its bit weird because it doesnt allow for weight and priority
  119. lovetox but i guess that would be really an edge case to have more than one websocket connection point
  120. MattJ HTTP doesn't
  121. lovetox ah so it always has to be over 80/443
  122. MattJ Yes
  123. lovetox that makes sense then
  124. MattJ We were discussing recently the 20 year-old bug report for Firefox to support SRV for HTTP
  125. MattJ Web folk have no interest in it
  126. lovetox writing since quite a time to move all connection/dns logic from gajim into nbxmpp
  127. lovetox if you want to support, xmpps, xmpp, websocket, unencrypted, proxy for websocket and tcp, setting a custom host (no srv resolution)
  128. lovetox and the lib should handle that all automatically, does get a bit complicated :D
  129. MattJ Indeed
  130. MattJ Someone needs to make a flowchart
  131. flow lovetox, that's exactly what I am also currently dealing with in my not-so-small smack refactor project
  132. lovetox but i have the luck of GLib taking most of the dns resolution away from me
  133. lovetox because if i would have to deal with stuff like happy eyeballs etc
  134. lovetox then i think it gets a bit crazy :)
  135. asterix has left
  136. flow I think you probably want happy eyeballs not only on the DNS level, but also on the connection level
  137. lovetox actually they ever provide methods like connect_to_service() where i just pass "xmpps-client"
  138. flow e.g. initiate TCP connections to the ipv4 and ipv6 endpoints in parallel
  139. lovetox yes flow GLib does that
  140. lovetox i incorrectly said DNS resolution, but GLib also does my connection
  141. flow nice
  142. asterix has joined
  143. lovetox though i had to implement socks5 proxy myself, because the code is really broken in GLib, but socks5 is really minimal, so not a problem
  144. flow now you may only want to make parallel connect_to_service calls for tcp+tls/direct-tls/websocket/bosh and use the transport whoever finishes first ;)
  145. lovetox hm no because they are not equivalent
  146. flow (I actually thought about doing that in Smack but decided against it for the moment, only the endpoint discovery runs concurrently)
  147. flow lovetox, I'd argue they are equivalent
  148. lovetox not direct tls has fewer roundtrips
  149. lovetox websocket is not as efficient as tcp
  150. flow sure, but why does it matter
  151. lovetox why does efficiency matter?
  152. flow that's not what I said
  153. lovetox of course i will try the way with fewest roundtrips first
  154. flow yes, there is a higher overhead in some transports, but isn't it also important to the user that the connection is established fast?
  155. lovetox also the chance that xmpps connect is failing although the server admin specified a srv record for it
  156. lovetox is probably minimal to 0
  157. lovetox eyeballs for ipv4, and ipv6 was made, because some networks didnt allow for ipv6, and some did, so there was no way to tell at start what will succeed
  158. lovetox so they race both
  159. flow lovetox, why try the one with the fewest roundstrips first when you could try all concurrently and simple use the one that finishes connecting first?
  160. lovetox because its much more work
  161. lovetox and almost no benefit
  162. Kev It also possibly depends what you mean by 'connecting'.
  163. lovetox opening a writeable socket
  164. flow lovetox, right, that's why I decided against it (for now)
  165. Kev A server operator probably isn't going to thank you for doing 6* as many TLS negotiations as you need, etc.
  166. flow Kev, true, but you could just not do TLS and define "connected" as layer 4 connection (e.g. TCP) established
  167. lovetox yes only open a socket
  168. lovetox also i do not retry with different connection method, if something fails while TLS negotiation or even on xmpp level
  169. lovetox then its just failed, im not helping the admin shadowing broken connection points
  170. flow well retry a different XMPP transport after a TLS negoation failure appears sensible. After all it could be a misconfigured BOSH endpoint while the other endpoint is correctly configured
  171. lovetox yeah exactly, no it does not make sense to me
  172. Kev Or not misconfigured, but a local transparent proxy is breaking HTTP.
  173. lovetox this way the point will never get fixed
  174. flow lovetox, I usually follow that argumentation, but it's the job of a client library to establish a connection whenever possible
  175. flow aborting the connection attempt seems even for me a little bit to harsh
  176. lovetox i think we have to disagree here
  177. flow of course we have
  178. lovetox and i think you never implement this right?
  179. flow define "this" pls
  180. lovetox retry different connection method if tls or xmpplevel fails
  181. flow I was explicitly only talking about TLS negotiation
  182. flow No, since Smack past and current design does iterate over different transports. It's only the new design that allows for modular transports to be used for the same connection, so I was not able to implement it in the past
  183. bhaveshsgupta has left
  184. lovetox yeah retry on error on xmpp level is just wrong for me
  185. lovetox and TLS .. maybe
  186. lovetox but think its tricky, would have to find out what TLS errors are errors where i want to try different
  187. lovetox cert error for example definitly not
  188. flow I'd thought especially cert errors
  189. lovetox and really do i want to connect desperatly to a server , where the admin didnt set up TLS correctly
  190. lovetox i dont know
  191. kikuchiyo has joined
  192. pulkomandy has left
  193. flow *does *not* iterate
  194. pulkomandy has joined
  195. sonny has left
  196. sonny has joined
  197. kikuchiyo has left
  198. debacle has joined
  199. sonny has left
  200. bhaveshsgupta has joined
  201. sonny has joined
  202. lovetox yeah i need to implement also POSH
  203. lovetox i forgot about that one
  204. pulkomandy has left
  205. pulkomandy has joined
  206. asterix has left
  207. bhaveshsgupta has left
  208. pulkomandy has left
  209. pulkomandy has joined
  210. lovetox has left
  211. larma has left
  212. larma has joined
  213. debacle has left
  214. lovetox has joined
  215. bhaveshsgupta has joined
  216. debacle has joined
  217. sonny has left
  218. Wojtek has joined
  219. sonny has joined
  220. kikuchiyo has joined
  221. asterix has joined
  222. sonny has left
  223. bhaveshsgupta has left
  224. lovetox has left
  225. asterix has left
  226. asterix has joined
  227. bhaveshsgupta has joined
  228. Tao has joined
  229. bhaveshsgupta has left
  230. bhaveshsgupta has joined
  231. Tao has left
  232. pulkomandy has left
  233. pulkomandy has joined
  234. Tao has joined
  235. Tao has left
  236. pulkomandy has left
  237. pulkomandy has joined
  238. sonny has joined
  239. asterix has left
  240. asterix has joined
  241. lovetox has joined
  242. asterix has left
  243. asterix has joined
  244. asterix has left
  245. asterix has joined
  246. asterix has left
  247. asterix has joined
  248. asterix has left
  249. asterix has joined
  250. asterix has left
  251. asterix has joined
  252. pulkomandy has left
  253. pulkomandy has joined
  254. pulkomandy has left
  255. pulkomandy has joined
  256. asterix has left
  257. asterix has joined
  258. pulkomandy has left
  259. pulkomandy has joined
  260. asterix has left
  261. asterix has joined
  262. serge90 has left
  263. serge90 has joined
  264. pulkomandy has left
  265. pulkomandy has joined
  266. bhaveshsgupta has left
  267. pulkomandy has left
  268. bhaveshsgupta has joined
  269. pulkomandy has joined
  270. bhaveshsgupta has left
  271. bhaveshsgupta has joined
  272. asterix has left
  273. asterix has joined
  274. bhaveshsgupta has left
  275. bhaveshsgupta has joined
  276. pulkomandy has left
  277. pulkomandy has joined
  278. strar has left
  279. sonny has left
  280. sonny has joined
  281. sonny has left
  282. pulkomandy has left
  283. pulkomandy has joined
  284. asterix has left
  285. asterix has joined
  286. sonny has joined
  287. bhaveshsgupta has left
  288. Zash has left
  289. Zash has joined
  290. bhaveshsgupta has joined
  291. lovetox has left
  292. lovetox has joined
  293. strar has joined
  294. asterix has left
  295. asterix has joined
  296. wurstsalat has left
  297. wurstsalat has joined
  298. sonny has left
  299. asterix has left
  300. asterix has joined
  301. bhaveshsgupta has left
  302. leosbrf has joined
  303. bhaveshsgupta has joined
  304. lovetox has left
  305. lovetox has joined
  306. bhaveshsgupta has left
  307. leosbrf Hello all, I'm trying to implement a "reply to" requirement. I use an ejabberd server. Can anyone point me directions on how I can implement this? I know about Threads (xep-0201), but the problem is that I need to get the parent message from the server and I didn't find a way to query for specific messages (I don't have all the message history, because I'm paging it)
  308. sonny has joined
  309. leosbrf .
  310. MattJ ,
  311. strar has left
  312. bhaveshsgupta has joined
  313. strar has joined
  314. MattJ You mean that you have a message, it says it is "in reply to message XYZ" and you need to find message XYZ?
  315. leosbrf yes
  316. leosbrf I also could make a query starting from 'message XYZ' and returning all other messages after it
  317. asterix has left
  318. asterix has joined
  319. leosbrf but the xmpp specs only gives me three fields: with, start, end
  320. MattJ Yeah, the current version of the XEP doesn't really support this use-case
  321. Zash hack: ask for one message and set rsm 'before' to the one you want and 'max=1', then request the message after the one you get.
  322. MattJ Ha
  323. MattJ But no, that's a terrible solution :)
  324. bhaveshsgupta has left
  325. bhaveshsgupta has joined
  326. leosbrf Zash , I tried that solution, but I would have to send a start/end filter. But the stanza only gives me an id which I believe is a unix timestamp. Still, I could not convert it to a proper datetime string accepted by the form_type. It gives me a NAN error 🤔
  327. Zash You shouldn't assume anything about archive ids, they're opaque strings.
  328. Zash As for ejabberd requiring all three MAM form fields, that's just weird.
  329. lovetox it does not
  330. Zash Looks like it to me
  331. lovetox maybe we talk about different things
  332. bhaveshsgupta has left
  333. lovetox but its impossible, the prime uscase and example in MAM is querying the archive without any formfield set
  334. lovetox and im pretty sure i never did set all 3 formfields ever
  335. Zash Every time I try that with an ejabberd, I get an error back.
  336. lovetox and MAM works fine
  337. Zash MUC-MAM tho
  338. lovetox why would that be different
  339. Zash Don't ask me
  340. lovetox has left
  341. lovetox has joined
  342. leosbrf in ejabberd (my settings) you could pass zero or more of the following fields: <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" /> <field var="withtext" type="text-single" label="Search the text" />
  343. lovetox please show the xml of your query
  344. bhaveshsgupta has joined
  345. leosbrf sure, one sec
  346. Zash <iq id='2' type='set' to='kuketzblog@rooms.dismail.de'><query queryid='f850e845-ce9e-4fd1-875d-206c6394ddbe' xmlns='urn:xmpp:mam:2'><x type='submit' xmlns='jabber:x:data'><field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field><field type='jid-single' var='with'/><field type='text-single' var='start'/><field type='text-single' var='end'/></x><set xmlns='http://jabber.org/protocol/rsm'/></query></iq> <iq type='error' from='kuketzblog@rooms.dismail.de' id='2' xml:lang='sv'><query queryid='f850e845-ce9e-4fd1-875d-206c6394ddbe' xmlns='urn:xmpp:mam:2'><set xmlns='http://jabber.org/protocol/rsm'/><x xmlns='jabber:x:data' type='submit'><field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field><field type='jid-single' var='with'/><field type='text-single' var='start'/><field type='text-single' var='end'/></x></query><error type='modify' code='400'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Bad value of field &apos;with&apos; of type &apos;urn:xmpp:mam:1&apos;</text></error></iq>
  347. lovetox em, yeah nobody does it like that
  348. Zash Oh because the fields are there?
  349. asterix has left
  350. asterix has joined
  351. Zash Works with Prosody
  352. leosbrf <iq id="supported_query_fields" to="some_room@conference.localhost" type="get" xmlns="jabber:client"><query xmlns="urn:xmpp:mam:2"/></iq>
  353. lovetox correct
  354. lovetox then i would say you dont respect the XEP zash
  355. lovetox the xep says server must only use the default if the field is omitted
  356. lovetox not if the value is omitted
  357. leosbrf and it returns: <iq xmlns="jabber:client" xml:lang="en" to="admin@localhost/106417850532246324662946" from="some_room@conference.localhost" type="result" id="supported_query_fields"> <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" /> <field var="withtext" type="text-single" label="Search the text" /> </x> </query> </iq>
  358. lovetox leosbrf, you need to do a "set" query, not a "get"
  359. lovetox what you request is the filter options
  360. lovetox but you dont need filters
  361. lovetox the xep is a bit weird this way, but there are 2 important distinctions
  362. Zash No code I have can distinguish between <field> being omitted and <value> being omitted.
  363. lovetox filterng and limiting
  364. lovetox as you see the filtering options dont help you with your usecase
  365. lovetox so just set no filter, which would tirgger the server to give you all messages in the archive
  366. bhaveshsgupta has left
  367. lovetox but because you dont want all messages, you limit this result now to one message with a specific id
  368. lovetox you can do this with adding a rsm node
  369. leosbrf lovetox , how can I limit that? What is the stanza that I need to send to server?
  370. lovetox <set xmlns='http://jabber.org/protocol/rsm'> <max>1</max> <after>09af3-cc343-b409f</after> </set>
  371. lovetox but as pointed out, you would need the message id, before the one you want
  372. lovetox you sadly cant request a specific id, you can only get all message after an id or before an id
  373. bhaveshsgupta has joined
  374. lovetox https://xmpp.org/extensions/xep-0313.html#query-paging
  375. lovetox btw what xep do you want to implement here that needs that?
  376. leosbrf I stuck in getting that id. Because when I request the room history, the stanzas returned have this format: <message xmlns="jabber:client" to="admin@localhost/3247206387247491563010" from="some_room@conference.localhost"> <result xmlns="urn:xmpp:mam:2" id="1578509255305907"> <forwarded xmlns="urn:xmpp:forward:0"> <message xmlns="jabber:client" xml:lang="en" from="some_room@conference.localhost/leo1" type="groupchat"> <x xmlns="http://jabber.org/protocol/muc#user"> <item jid="leo1@localhost/107114335247801189862018" /> </x> <archived xmlns="urn:xmpp:mam:tmp" by="some_room@conference.localhost" id="1578509255305907" /> <stanza-id xmlns="urn:xmpp:sid:0" by="some_room@conference.localhost" id="1578509255305907" /> <urls /> <body>someone send a message</body> </message> <delay xmlns="urn:xmpp:delay" from="conference.localhost" stamp="2020-01-08T18:47:35.305907Z" /> </forwarded> </result> </message>
  377. lovetox what xep you want to implement?
  378. lovetox what is "reply to"
  379. pulkomandy has left
  380. pulkomandy has joined
  381. goffi has joined
  382. sonny has left
  383. Zash has left
  384. Zash has joined
  385. Zash has left
  386. Zash has joined
  387. leosbrf what is "reply to"? that is a similar functionality that whatsapp provides (you click a message and click reply). The way I implement, I would store the message id in the child message
  388. leosbrf lovetox 👆
  389. lovetox so not a XEP
  390. lovetox you doing your own thing
  391. lovetox yeah attaching something to a message is a big discussion right now, and its currently not possible
  392. lovetox because MAM is not adapted to that usecase
  393. asterix has left
  394. asterix has joined
  395. sonny has joined
  396. leosbrf hmm, so that is the reason why I spent some hours researching and found none implementation..hehe . But something you said before gave me directions. In this example: <after>09af3-cc343-b409f</after>. Is this code something dynamically generated for the current query request?
  397. sonny has left
  398. aj has joined
  399. lovetox has left
  400. sonny has joined
  401. aj has left
  402. debacle has left
  403. sonny has left
  404. asterix has left
  405. asterix has joined
  406. bhaveshsgupta has left
  407. sonny has joined
  408. asterix has left
  409. asterix has joined
  410. asterix has left
  411. asterix has joined
  412. sonny has left
  413. asterix has left
  414. asterix has joined
  415. Wojtek has left
  416. Wojtek has joined
  417. Wojtek has left
  418. asterix has left
  419. asterix has joined
  420. asterix has left
  421. asterix has joined
  422. pulkomandy has left
  423. asterix has left
  424. asterix has joined
  425. asterix has left
  426. asterix has joined
  427. sonny has joined
  428. asterix has left
  429. asterix has joined
  430. sonny has left
  431. sonny has joined
  432. Meta Bergman has left
  433. Meta Bergman has joined
  434. debacle has joined
  435. leosbrf @lovetox , Anyway, thank you for the information provided
  436. leosbrf has left
  437. kikuchiyo has left
  438. asterix has left
  439. asterix has joined
  440. sonny has left
  441. sonny has joined
  442. kikuchiyo has joined
  443. bhaveshsgupta has joined
  444. asterix has left
  445. asterix has joined
  446. lovetox has joined
  447. sonny has left
  448. sonny has joined
  449. bhaveshsgupta has left
  450. sonny has left
  451. sonny has joined
  452. asterix has left
  453. asterix has joined
  454. asterix has left
  455. asterix has joined
  456. paul has left
  457. paul has joined
  458. paul has left
  459. paul has joined
  460. kikuchiyo has left
  461. kikuchiyo has joined
  462. paul has left
  463. paul has joined
  464. paul has left
  465. paul has joined
  466. kikuchiyo has left
  467. sonny has left
  468. kikuchiyo has joined
  469. sonny has joined
  470. wurstsalat has left
  471. lovetox has left
  472. strar has left
  473. sonny has left
  474. kikuchiyo has left
  475. kikuchiyo has joined
  476. sonny has joined
  477. strar has joined
  478. sonny has left
  479. asterix has left
  480. asterix has joined
  481. pulkomandy has joined
  482. sonny has joined
  483. bhaveshsgupta has joined
  484. asterix has left
  485. gav has left
  486. bhaveshsgupta has left
  487. gav has joined
  488. pulkomandy has left
  489. sonny has left
  490. kikuchiyo has left
  491. kikuchiyo has joined
  492. pulkomandy has joined
  493. sonny has joined
  494. pulkomandy has left
  495. pulkomandy has joined
  496. kikuchiyo has left
  497. pulkomandy has left
  498. pulkomandy has joined
  499. goffi has left
  500. sonny has left
  501. sonny has joined
  502. debacle has left
  503. debacle has joined
  504. debacle has left
  505. debacle has joined