jdev - 2020-04-04


  1. lovetox

    finally i have some time to get a bit into gateway stuff

  2. lovetox

    the XEP says a client can add the gateway to its roster

  3. lovetox

    Gajim does that, and i never found a use for that

  4. lovetox

    now i can chat with the gateway?

  5. lovetox

    one thing that is useful, is its an entry point into issuing adhoc commands, but in Gajim you can do this from other parts of the application as well

  6. Ge0rG

    lovetox: there is another benefit to that: the gateway is automatically receiving your presence updates

  7. lovetox

    ah ok so he relates my presence then to the other service

  8. Zash

    But it would also get presence for every contact it adds

  9. lovetox

    ok thats a reason to have it in the roster internally, is there a reason to expose this as UI contact in the roster?

  10. Zash

    Sometimes there are ad-hoc commands or other actions you can take

  11. Zash

    While not a gateway, I have some pubsub services that works a bit like chat bots, and it's annoying when clients decide to hide them or prevent sending messages to them

  12. lovetox

    ok lets say its a gateway for facebook

  13. lovetox

    facebook has a kind of roster

  14. lovetox

    if i register there, the gateway sends me presences of all the users on my facebook roster

  15. lovetox

    then i can add them to my roster

  16. lovetox

    if i unregister from the transport i have to remove all the contacts from my roster

  17. Zash

    Didn't Gajim support roster item exchange?

  18. Zash

    There's also a thing where the transport is allowed direct access to your roster by the server.

  19. lovetox

    Zash is this another XEP?

  20. Zash

    lovetox: https://xmpp.org/extensions/xep-0321.html

  21. Zash

    The other was https://xmpp.org/extensions/xep-0144.html

  22. lovetox

    thanks

  23. lovetox

    hm, how can i keep track to what transports im registered?

  24. lovetox

    say i register to 5 transports, then i clear all my application data, reset my client, and login the first time again

  25. lovetox

    now the server sends me my roster, but i cant really know what of these contacts are gateways

  26. lovetox

    i would have to disco info every single contact

  27. lovetox

    can i assume that all transport JIDs are only domains?

  28. lovetox

    so dont contain an @

  29. Zash

    lovetox: Not sure if there are transports of this kind that are not bare host JIDs, however there may be bare host JIDs in the roster that are not transports.

  30. Zash

    I suppose you'll have to disco#info to be sure

  31. lovetox

    yeah, but at least i dont have to disco info my whole roster

  32. lovetox

    The address of a gateway itself SHOULD be a hostname only, and that hostname SHOULD NOT be supplemented with a resource identifier when referring to the gateway's address

  33. lovetox

    so i guess SHOULD is fine enough for me

  34. Zash

    You could also guess that it's a gateway if you also have a bunch of bare jids from the same domain.

  35. lovetox

    for now i plan, if its only a bare jid, then disco info, if it is a gateway send a iq:register to see if im registered

  36. lovetox

    or i can assume from the fact that i have a active subscription that im registered

  37. lovetox

    as XEP says on unregister the gateway should send unsubscribe

  38. lovetox

    ok first transport i look into twitter from spectrum2

  39. lovetox

    and it sends me a presence with a caps node https://gajim.org

  40. lovetox

    hm and spectrum2 project seems not very active

  41. moparisthebest

    lovetox: cheogram.com is a transport I (and probably a lot of people) add and use from gajim

  42. moparisthebest

    Gajim is the only client that properly marks contacts from it with a mobile phone icon

  43. moparisthebest

    https://jmp.chat for a free trial if you want to play with it

  44. lovetox

    thanks moparisthebest will try

  45. lovetox

    moparisthebest, is there also something like jmp for non-us?

  46. lovetox

    if i use this to send a sms to someone where i live, and they answer they probably pay much because they are sending sms to the US

  47. moparisthebest

    You can send/recieve with non-us/Canada numbers but they haven't had luck finding providers in other countries

  48. moparisthebest

    Everything they've found is much much more expensive

  49. lovetox

    yeah

  50. lovetox

    i looked it up its 7 cents from my country to that number

  51. moparisthebest

    lovetox: xmpp:discuss@conference.soprani.ca?join they have a wiki page where they've documented the providers they have found but I can't find it at the moment

  52. lovetox

    foundit on their wiki thanks

  53. moparisthebest

    I did hack up Conversations to provide a similar UI using the number on your phone but I need to revisit that approach, probably conversations fork :'(

  54. lovetox

    Are there not flat rate tarifs in the US for sms?

  55. lovetox

    i understand that its nice to write from a xmpp clients sms

  56. lovetox

    but i dont know if i would pay for that

  57. lovetox

    if i can write sms from my smartphone for "free"

  58. lovetox

    as in i already pay a flatrate

  59. moparisthebest

    In the US most SMS plans are just unlimited everything for 1 price

  60. lovetox

    but seems there are some people who pay for that, otherwise the service would not exist

  61. Zash

    but are they actually unlimited?

  62. moparisthebest

    So if you use the last 3 commits from https://github.com/moparisthebest/Conversations/commits/sms and https://github.com/moparisthebest/xmpp-echo-self you can have the same experience anywhere with your existing number

  63. moparisthebest

    Less bells and whistles, no SIP etc, but at least I don't need to use a damn phone keyboard

  64. moparisthebest

    Zash: for my use yes, usually they have a fine print limiting you to a few thousand I guess

  65. lovetox

    i wonder what keeps me from registering for a new phone number every 30 days

  66. lovetox

    if i own a domain and server, i could register a new user every 30 day

  67. moparisthebest

    Likely nothing, they are more FOSS guys than businessmen :)

  68. Zash

    moparisthebest: You reminded me of how annoying telcos are, and how annoyed I am by not being able to pay for what I use, with only variations of "unlimited (but not really)" to choose from

  69. Zash

    I miss pay-as-you-go :(

  70. flow

    lovetox, I think there is much knowledge about how gateways/transports are used in PSI's codebase (and probably gajim's too)

  71. flow

    at least when I think at the era where transports where widely used to bridge to ICQ, MSN, etc. those where the clients you would use

  72. flow

    I still look back at the time when gajim introduced the mata-contact feature in the roster, that was really great!

  73. lovetox

    yeah i still think about how to use meta-contacts in a more useful wa

  74. lovetox

    yeah i still think about how to use meta-contacts in a more useful way

  75. lovetox

    its kind of outdated now

  76. Zash

    There are still those with multiple JIDs, and bridges are apparently coming back for another round

  77. lovetox

    The problem now with transports is to actually find ones that you can develop against

  78. lovetox

    transports that are good and actively maintained

  79. lovetox

    Zash, of course but how would that meta contact work in practice

  80. lovetox

    of course i can group multiple jids into one

  81. lovetox

    but now most of the time all JIDs are online

  82. lovetox

    compared to 10 years ago where only one was online when you were at work, and one when you were at home

  83. lovetox

    so the client always knew, ok i send the message to the online jid

  84. lovetox

    but now with multiple online contacts, its seems weird to spread the messages to multiple devices

  85. flow

    lovetox, I had a lot of contacts with MSN, ICQ, simultanously online ~15 years ago

  86. flow

    metacontacts IIRC made the roster much more accessible

  87. lovetox

    im not talking about the user perspective, of course one contact is nicer then 3

  88. lovetox

    but is it not weird to send messages to the more "active" jid

  89. lovetox

    if both are online

  90. lovetox

    and spreach history over different clients

  91. lovetox

    that are not even synced, they are on different networks

  92. lovetox

    *spread

  93. Zash

    Maybe bring back the resource locking thing? :)

  94. Zash

    I guess it'll be annoying to have MAM stuff spread over multiple users too

  95. Zash

    So, the lession we learned was that transports will never work perfectly.

  96. Zash

    Their purpose is to reach those who has yet to see the light while letting you stay in the comforts of XMPP

  97. lovetox

    and it becomes more compicated with E2E in the picture

  98. Zash

    Making it a touch annoying is probably fine, you can't avoid it, and if it encourages switching to native XMPP then that's great

  99. lovetox

    imagine you put one skype contact and one xmpp contact into one meta contact

  100. lovetox

    one has E2E the other not

  101. Zash

    Ugh

  102. lovetox

    and the client switching between them based on activity

  103. Zash

    If you use E2EE, always use E2EE

  104. Zash

    Unless the user otherwise I guess

  105. lovetox

    to solve stuff like that it gets so complex and you have to handle so many cases

  106. lovetox

    that i just question is it worth it?

  107. lovetox

    only thing i could see, is that metacontact is like a group thingy, where we just show the user, these JIDs belong all to the same person

  108. lovetox

    but in the end letting the user choose to which address to write

  109. lovetox

    not trying to do some magic

  110. lovetox

    and merging history from all 3

  111. lovetox

    so if the contact writes from any of his devices, it shows in the same chat window

  112. Zash

    where did I put my phone?

  113. Zash

    Dunno how other phones handle it, but Sailfish has a selector thing for different contact methods in the chat/sms where you can pick which phone number to send to. (or XMPP address, or other methods)

  114. lovetox

    yeah something like that i imagine also

  115. Zash

    No idea if it automagically switches if a reply is received from a different method

  116. lovetox

    yeah we could do something like that, switch automatically to the jid we received a message from

  117. lovetox

    so a bit of magic is possible

  118. lovetox

    hm i heard some do purge offline messges and only sync with mam

  119. lovetox

    but to be safe i should only do this if i know mam is activated on my account

  120. lovetox

    was there any gotcha with enablind carbons?

  121. lovetox

    or is simply enabling before sending first presence enough