jdev - 2019-10-12


  1. skyfar has left

  2. SkyfaR has left

  3. SkyfaR has joined

  4. sonny has left

  5. sonny has joined

  6. sonny has left

  7. aj has joined

  8. sonny has joined

  9. vanitasvitae has joined

  10. aj has left

  11. sonny has left

  12. sonny has joined

  13. allie

    anyone here happen to have experience using stanza.io? I'm running into some weird issues with it and I'm not quite sure what to do

  14. wurstsalat has left

  15. lksjdflksjdf has left

  16. moparisthebest has left

  17. moparisthebest has joined

  18. sonny has left

  19. allie

    in case anyone happens to stop back by when I'm away, when I use client.getRoomMembers(jid) in stanza.io, I get an error. It looks like it may be sending some type of incorrect/malformed request to the server, so it gets rejected, but I can't figure out what it's supposed to be sending or if I'm missing something. Stanza seems to not have much in the way of documentation.

  20. allie has left

  21. allie has joined

  22. aj has joined

  23. moparisthebest has left

  24. moparisthebest has joined

  25. chronosx88 has joined

  26. rion has left

  27. rion has joined

  28. sonny has joined

  29. larma has left

  30. sonny has left

  31. larma has joined

  32. asterix has joined

  33. sonny has joined

  34. sonny has left

  35. lovetox has joined

  36. ShadowRanger has joined

  37. lovetox

    allie, show us what it sends, and what the response from the server is

  38. ShadowRanger has left

  39. asterix has left

  40. asterix has joined

  41. sonny has joined

  42. debacle has joined

  43. Syndace has left

  44. asterix has left

  45. asterix has joined

  46. Syndace has joined

  47. debacle has left

  48. asterix has left

  49. wurstsalat has joined

  50. asterix has joined

  51. Daniel has left

  52. sonny has left

  53. UsL has joined

  54. debacle has joined

  55. aj has left

  56. UsL has left

  57. Daniel has joined

  58. sonny has joined

  59. skyfar has joined

  60. Daniel has left

  61. UsL has joined

  62. asterix has left

  63. asterix has joined

  64. lksjdflksjdf has joined

  65. skyfar has left

  66. ralphm has left

  67. ralphm has joined

  68. UsL has left

  69. debacle has left

  70. Zash has left

  71. aj has joined

  72. asterix has left

  73. asterix has joined

  74. Daniel has joined

  75. Daniel has left

  76. asterix has left

  77. asterix has joined

  78. Zash has joined

  79. chronosx88 has left

  80. debacle has joined

  81. chronosx88 has joined

  82. asterix has left

  83. asterix has joined

  84. asterix has left

  85. asterix has joined

  86. Daniel has joined

  87. Holger has left

  88. aj has left

  89. asterix has left

  90. asterix has joined

  91. lksjdflksjdf has left

  92. lksjdflksjdf has joined

  93. SkyfaR has left

  94. SkyfaR has joined

  95. asterix has left

  96. asterix has joined

  97. debacle has left

  98. debacle has joined

  99. asterix has left

  100. asterix has joined

  101. asterix has left

  102. asterix has joined

  103. asterix has left

  104. asterix has joined

  105. allie

    lovetox: I will once I'm back at the computer :)

  106. asterix has left

  107. asterix has joined

  108. asterix has left

  109. asterix has joined

  110. asterix has left

  111. asterix has joined

  112. asterix has left

  113. asterix has joined

  114. gav has joined

  115. asterix has left

  116. asterix has joined

  117. asterix has left

  118. asterix has joined

  119. debacle has left

  120. asterix has left

  121. asterix has joined

  122. asterix has left

  123. asterix has joined

  124. moparisthebest has left

  125. moparisthebest has joined

  126. Daniel has left

  127. Daniel has joined

  128. Daniel has left

  129. asterix has left

  130. asterix has joined

  131. chronosx88 has left

  132. Daniel has joined

  133. chronosx88 has joined

  134. asterix has left

  135. asterix has joined

  136. asterix has left

  137. asterix has joined

  138. allie

    lovetox: ugh, I'm not sure which part to show. It seems sometimes it sends an iq to the room JID, but sometimes it's just a mostly empty request? Neither one of them work, though. I'm not sure what is going on or if I'm just using this library incorrectly.

  139. allie

    lovetox: here's the one that's sorta empty: <body xmlns="http://jabber.org/protocol/httpbind" rid="3391751414" sid="ebf40bc3-de75-47d2-9241-e6af623f0417"><r xmlns="urn:xmpp:sm:3"/></body>

  140. allie

    lovetox: and the response to that is: <body sid='ebf40bc3-de75-47d2-9241-e6af623f0417' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'><iq type='error' to='scc@mbl.social/a3gSsBnh' from='moonbootlabs@chat.mbl.social' id='1891886b-7d9a-4e84-bf83-9c51b6ca8578' xmlns='jabber:client'><error type='cancel'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq><a h='7' xmlns='urn:xmpp:sm:3'/></body>

  141. allie

    but sometimes...

  142. Zash

    xep-198 in bosh???

  143. allie

    Zash: I think stanza supports it?

  144. allie

    I'm not enabling anything other than whatever the defaults are, though.

  145. Zash

    But...

  146. skyfar has joined

  147. allie

    I have no idea

  148. allie

    all of these libraries are just frustrating me. there seems to be almost no documentation. I guess I'm supposed to know how to use everything before knowing how to use it :(

  149. asterix has left

  150. asterix has joined

  151. debacle has joined

  152. lovetox

    allie, i would disable bosh and connect normaly to start with

  153. lovetox

    and no you didnt post the iq the lib sent

  154. lovetox

    only a streammanagement stanza

  155. allie

    no, I didn't. because now I'm trying to figure out what is actually relevant.

  156. allie

    and what do you mean "connect normally"?

  157. lovetox

    relevant is the iq that has the id 1891886b-7d9a-4e84-bf83-9c51b6ca8578

  158. marc0s has left

  159. marc0s has joined

  160. allie

    k let me look

  161. lovetox

    i thought you writing a client here, are you saying the lib prefers connecting via bosh

  162. lovetox

    and you didnt configure that

  163. allie

    it's a JavaScript library. stanza.io. I don't think it connects any way but bosh or websockets

  164. lovetox

    ah ok my bad then

  165. lovetox

    these bodys is a wrapper

  166. allie

    here's the iq: <body sid='ebf40bc3-de75-47d2-9241-e6af623f0417' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'><iq type='error' to='scc@mbl.social/a3gSsBnh' from='moonbootlabs@chat.mbl.social' id='1891886b-7d9a-4e84-bf83-9c51b6ca8578' xmlns='jabber:client'><error type='cancel'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq><a h='7' xmlns='urn:xmpp:sm:3'/></body>

  167. lovetox

    always look only into whats inside the body tags

  168. lovetox

    yeah you just reposted the error

  169. lovetox

    but there has to be an iq with that id before the error

  170. lovetox

    Iq request has an ID, and the answer reflects that id

  171. lovetox

    you posting the answer

  172. allie

    maybe firefox is getting confused here. let me try to rerun it all. that came from the request body of the client.

  173. allie

    (rather than the response)

  174. allie

    or it's just me, hell if I know

  175. allie

    gimme a sec

  176. lovetox

    and maybe use some paste site

  177. allie

    https://pastebin.com/JAtYkJC7

  178. lovetox

    yeah this is wrong

  179. lovetox

    its missing what affiliation you want to request

  180. lovetox

    are you sure you can set it somewhere on the stanza?

  181. lovetox

    <item affiliation='member'/>

  182. lovetox

    thats how it should look like int the request

  183. allie

    I think it can be set through the options to that function. But there's no documentation that I can find. Let me try something there and see if it works.

  184. asterix has left

  185. asterix has joined

  186. asterix has left

  187. asterix has joined

  188. lovetox

    it seems you have to create a MUCUserItem and pass it

  189. lovetox

    and in that object you have to set a MUCAffiliation of type member

  190. lovetox

    if you want the member list

  191. lovetox

    and just before you get suprised, member list does not include admins and owner

  192. lovetox

    you have to request the owner list and admin list for that

  193. lovetox

    but i would report it as a bug to the project, that the second argument is optional

  194. lovetox

    this function makes no sense without the second argument

  195. allie

    so, if I add the affiliation and pass it in the way it looks like it is in the source, I get an auth error saying forbidden

  196. lovetox

    yes possible, some servers only allow admins and owners to retrive that list

  197. lovetox

    create a muc on your own and test again

  198. allie

    the request includes <item affiliation="member">

  199. lovetox

    yes then its correct, auth error means you are not allowed

  200. lovetox

    means you are not an admin or owner in this muc

  201. allie

    makes sense

  202. lovetox

    some server allow it some dont

  203. allie

    so if the room is set where only admins/moderators can see JIDs of members, is that what would prevent it?

  204. lovetox

    yes then the server should definitly not send you the list

  205. allie

    so how does a client determine who is in the room?

  206. lovetox

    read XEP-0045

  207. lovetox

    short version, you get a presence stanza of everyone who is in the room currently, on join

  208. allie

    Okay, I think I've got it. All I'm trying to do is make a web-based MUC client that does what I want. But it seems nobody likes to document these libraries.

  209. allie

    thank you for helping me and pointing me in the right direction :)

  210. asterix has left

  211. asterix has joined

  212. asterix has left

  213. debacle has left

  214. vanitasvitae has left

  215. skyfar has left

  216. Daniel has left

  217. Daniel has joined

  218. debacle has joined

  219. lovetox has left

  220. rion has left

  221. rion has joined

  222. skyfar has joined

  223. chronosx88 has left

  224. skyfar has left

  225. Daniel has left