Gajim - 2015-10-12


  1. tmolitor arune: I think this would be a really nice feature... asterix: what do you say?
  2. tmolitor fixed a concurrency bug in the url_image_preview plugin btw...
  3. tmolitor asterix: I can't push my changes to the repo...I get this: # hg push pushing to ssh://hg@hg.gajim.org/gajim-plugins abort: no suitable response from remote hg!
  4. maximillian hello, i use gajim from debian repository (https://packages.debian.org/jessie/gajim) and get this error message http://pastebin.com/b7J2KAQL i try this and that but nothing helps. i am not a programmer so i can not understand what it means. maybe anyone here has a solution for me. this error appears only on my notebook after update from wheezy to jessie. on my other debian jessie machines gajim works fine.
  5. bot RSS: Feeds for Gajim Plugins • Ticket #113 (Url image preview) closed invalid https://trac-plugins.gajim.org/ticket/113#comment:2
  6. Asterix tmolitor: ho, strange! I pushed things there 2 days ago ... Are you able to clone it?
  7. Asterix maximillian: it's a permission issue. It seems that this module needs to write a file somewhere and it doesn't have rights. Is your /tmp correctly configured for example?
  8. maximillian Asterix: i try this https://paste.gajim.org/view/06891c0d maybe it could say more.. i will find out if this files exist in my system
  9. maximillian it seems that last open have no directory?!
  10. Asterix the errors on .pyo are not a problem. only the last one seems to be a problem
  11. salah Hello Guys
  12. salah just started to use gajim
  13. salah I am trying to connect it to ldap
  14. Asterix hm? Gajim connected to ldap?
  15. salah yeah
  16. salah all my contacts are like user@domain,com
  17. salah and it is annoyin a bit :)
  18. salah so I figured I ll play with the code a bit
  19. Asterix they are like that because they don't have a nickname
  20. salah yeah
  21. salah sometime someone is pinging me and I would like to know what is this person name and function
  22. salah and I have to go to my directory to check it
  23. salah I managed to connect the ldap server
  24. Asterix that could (should) be configured server side
  25. salah yeah
  26. salah I am on linux
  27. salah and basically on my own
  28. salah I d use jabber it would be fine but that d mean I would have to use windows
  29. salah or mac,..
  30. salah so in short my question
  31. salah I wanted to know where in the code we download the contact list
  32. salah and where do we store it
  33. Asterix we don't download it. Server sends it
  34. salah ok we save it though?
  35. Asterix it depends ... Some server implements a feature names roster versionning
  36. Asterix does your server have it?
  37. salah I guess yes
  38. Asterix then on startup, Gajim asks the server what's the latest version number of the contact list. If it's the same as the version we have in our cache, we don't go further
  39. salah ok
  40. salah what I see is that I receive some xml with all my contacts
  41. Asterix that mean you don't have versionning .....
  42. salah ok :)
  43. salah so basically the idea is once the contact list is downloaded
  44. salah contact ldap
  45. salah for all successful queries
  46. salah save it in a dict then json file
  47. salah the update the roster
  48. salah on the server
  49. salah next time I connect, I check the contact list against the json
  50. salah and update it
  51. salah if needed
  52. Asterix all those contacts, you added them to your contact list yoursef?
  53. salah yeah
  54. Asterix ok then you should have added a name when you did that, no?
  55. salah for some yes
  56. salah but sometime have no time to do it
  57. salah and after few months I have a lot of people with just a jid
  58. Asterix ok.
  59. Asterix do you want to do that cleanly in a plugin or quick and durty in Gajim's code
  60. salah well I ll start with dirty then why not a plugin...
  61. Asterix dirty way: go in src/common/connection_handlers.py, look for "ROSTER_ARRIVED"
  62. Asterix this is where you can add your code
  63. maximillian cann't find the problem it is a little bit strange :( but thanks for helping me!
  64. salah       elif self.awaiting_answers[id_][0] == ROSTER_ARRIVED: ?
  65. Asterix yes
  66. Asterix maximillian: sorry ... I have no idea ...
  67. maximillian no problem
  68. salah roster = self.connection.getRoster(force=True)
  69. salah this is the data struct ?
  70. Asterix try to print roster_data to be sure
  71. salah nope does not seem to be there
  72. salah I print roster and roster_data
  73. salah does not show anything...
  74. Asterix salah: ok then look in _nec_roster_received function
  75. Asterix print obj.roster in the if obj.received_from_server:
  76. salah ok
  77. salah looks better :)
  78. salah ok I can do with that
  79. salah I guess the last thing I need is the function or method to update the contact on the server
  80. salah def update_contact(self, jid, name, groups): if self.connection and self.roster_supported: self.connection.getRoster().setItem(jid=jid, name=name, groups=groups)
  81. salah in common/connection.py
  82. salah is that it ?
  83. Asterix that's it. From the _nec_roster_received, just call obj.conn.update_contact()
  84. salah ok let me do a very quick test :)
  85. arune salah, what client are the windows users using?
  86. salah they use cisco jabber
  87. salah By the way what do you think about the idea of integrating ldap
  88. salah with gajim
  89. salah it can be nice...
  90. Asterix to do what?
  91. Asterix what you're doing?
  92. salah well fist I am fixing my contact not to display jid
  93. Asterix that's not a good way to do it. Users are supposed to configure a vcard, and you're supposed to know who you add to your contact list ...
  94. salah yeah but there is no vcard
  95. salah and no one would do that for me
  96. Asterix it's not for you, it's for all their contacts
  97. salah also sometimes people are pinging me and I just see a user id ...
  98. salah so far I am thinking about ldap
  99. salah but if you have a better idea... :)
  100. Asterix when someone contacts me and doesn't announce his name, I just ask him who he is
  101. salah well I have a directory webpage
  102. salah I can check who the person is
  103. salah but I need to open a webpage etc ...
  104. salah I already played with that
  105. salah I modified     def get_shown_name(self):
  106. salah in contacts.py and now I can see who is pinging
  107. salah yeah so looks like I am all set :)
  108. salah so I ll do a quick and dirty thing
  109. salah but if in the future I want to make a plugin where do I start ?
  110. Asterix you just have to create a small plugin that add a handler for the roster-received event, and add your code in this handler rather than in connection_handlers.py. That should be very easy
  111. arune salah: normally the server does this for you in xmpp
  112. bot RSS: Feeds for Gajim Plugins • Ticket #110 (Snarl plugin doesn't work) updated I fixed the gajim installer with updated parts. Could you test and confirm that it now works corectly with ​this version https://trac-plugins.gajim.org/ticket/110#comment:1