Gajim - 2015-08-17


  1. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  2. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  3. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  4. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  5. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  6. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  7. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  8. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  9. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  10. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  11. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  12. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  13. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  14. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  15. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  16. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  17. whoami Hello all! Thanks for application. I have a question, is Gajim support https://code.google.com/p/prosody-modules/wiki/mod_mam ? I can't find, how to enable in Gajim message storing in prosody 0.10. Mom_mam log: mamm: user1's rule for user2@jabber.com is nil mam: user1's default rule is false
  18. whoami Gajim 0.16.3
  19. whoami Also: Windows 7, Gajim 0.16.3. When exit Histrory manager got error: Microsoft Visual C++ Runtime Library --------------------------- Runtime Error! Program: D:\Program Files (x86)\Gajim\bin\history_manager.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
  20. arune tmolitor: there is already a plugin for displaying images! URL image preview plugin
  21. arune tmolitor: and I've improved it recently to not display the URL and be clickable
  22. arune Don't know if Asterix would consider merging such in gajim main
  23. arune tmolitor: oh, I also improved the plugin with it doing a head request and checking content type and content length before doing a download
  24. arune See gajim plugin issue #104
  25. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  26. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  27. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  28. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  29. tmolitor arune: well, a plugin would never integrate as seamlessly as a "native" implementation...I'll implement it as an option you can turn on if you want and if it is on and your server supports httpuploads, your filetransfers are automatically send via httpupload (and not via jingle file transfer)...
  30. tmolitor arune: this is the first task...the second will be to implement some kind of (maybe automatic) download of files send via httpupload...ideally display images inline (but only for messages only containing a link and no more text)...
  31. tmolitor arune: the second task is almost completed, but I had to use a very bad workaround (in my opinion) to just display images or download buttons if the message consists only of the link and not if the message also contains some text...
  32. tmolitor arune: ...because I wrote it as a plugin...as "native" implementation this workaround would possibly be no longer needed...
  33. arune tmolitor: your messages seems to repeate, strange
  34. tmolitor arune: you are right, I don't know why gajim (or conversations) thinks my messages have to be send twice :D
  35. arune Or five times 😵
  36. arune tmolitor: broken prosody smacks module maybe?
  37. tmolitor arune: your improved image preview plugin seems to be exactly what I want, could you email it to me or send me a download link? :) what does your plugin, if its not an image link? or if the link is in between normal text parts?
  38. tmolitor arune: I don't know, the server I'm using with this account is not under my control
  39. arune tmolitor: https://trac-plugins.gajim.org/ticket/105
  40. arune It's a patch to gajim main (but that change is now in hg 0.16 branch)
  41. arune And patch to the URL image preview plugin
  42. tmolitor arune: both containing the same changes or do I need both?
  43. arune Either you run gajim-nightly or patch your gajim or run gajim from hg repos
  44. arune And you also need to patch the URL image preview plugin
  45. tmolitor arune: ah okay, so I need both changes...I'm running gajim nightly already, so I only have to patch the image preview plugin now :)
  46. tmolitor arune: your code looks very nice btw :)
  47. arune (Sorry for being difficult to understand, I write on my phone with my two kids hanging around)
  48. arune tmolitor: thx first time python so I appreciate feedback for improvement
  49. tmolitor arune: well, it's my first time to use python also...I don't think I'm a good source for improvements...but it looks very clean :)
  50. tmolitor arune: I understand you pretty well :)
  51. tmolitor arune: I'm patching my image preview plugin right now
  52. arune tmolitor: I'd love to test your patches for httpupload
  53. arune And you've updated you gajim-nightly past week?
  54. tmolitor arune: no, I updated it right now ;)
  55. arune (If there's an URL with text the image preview is still displayed)
  56. arune There's also settings for the plugin
  57. tmolitor arune: okay, I think I'll stick to a second upload button for now and code this httpupload thing as a plugin, too....as you suggested earlier...
  58. tmolitor arune: I'll give you the httpupload plugin to test as soon as it is ready :)
  59. tmolitor arune: if I download the patch in https://trac-plugins.gajim.org/ticket/105 as zip file the contained file consists entirely of ascii chars 255 :o
  60. tmolitor arune: ah okay, I managed to download the patch directly without that zip file...
  61. tmolitor arune: the patch is applied (I had to change min gajim version in the manifest file to 16.3 to work with the latest nightly (20150813-1))...but the link is not being replaced...I'll investigate further tomorrow, have to go now...
  62. arune tmolitor: hmm strange
  63. arune The file isn't bigger than the limit in the config?
  64. tmolitor arune: I din't check this, I'll check it tomorrow...
  65. arune tmolitor: also check for errors in the terminal
  66. tmolitor arune: okay, I checked it now, the max filesize was too low (the file was 3MB in size)...
  67. arune OK, there's a limit in gajims download function for 2MB and the plugin defaults to 512kB
  68. tmolitor arune: it would be nice to also have the option to accept files smaller than 4MB...for the moment the largest value in the settings is 2MB...
  69. tmolitor arune: really? where is this limitation, I want to change it :)
  70. arune tmolitor: yes, due to the limit in gajim
  71. arune In helpers.py
  72. arune Plus the plugin
  73. tmolitor ah okay...
  74. tmolitor arune, asterix: yes, I remember...I had to change this, too, when I tweaked the old image preview plugin...I think this values are too small (the connect timeout values, too), because I sometimes got timeouts because my internet was too slow...and images can often be larger than 2MB, I think 6MB or even 8MB would be a more reasonable value to still prevent DOS but deliver a better user experience...
  75. Asterix this download function is not used only here. and I don't think auto-downloading a big file is a good think. This function was done for HTML rendering, and making the client download a big file was refused.
  76. tmolitor arune: you could extend your plugin to also save the images to some cache folder...otherwise you have to fetch the image every time the chat window is opened...
  77. tmolitor asterix: well ok, but for the image plugin the limit is too low, I think....we could set the max filesize as optional argument to the download function...this way no existing code has to be changed, but plugins requiring a bigger limit can define their own limit...
  78. tmolitor asterix: would that be acceptable?
  79. Asterix yes that could be done this way
  80. tmolitor arune: hash the url and use the hash as filename in the cache directory...that would speed up the image display...
  81. tmolitor asterix: okay...I'll create a patch for that tomorrow :)
  82. Link Mauve tmolitor, and when do you invalidate the cache?
  83. tmolitor Link Mauve: you could make this configurable in the plugin config....let the users choose a timeout that fits their needs (or forever if they want to)...
  84. Link Mauve Or, use the mtime in the request, so if it’s 304 you are fine, if it’s 200 you redownload it.
  85. tmolitor Link Mauve: oh, yes....that would be even better....but you would have to support etags as well....
  86. tmolitor I have to go now...sorry guys...I'll be back tomorrow :)
  87. Link Mauve Anyway, I would likely never use such a plugin. :p
  88. Link Mauve Alright, good bye. \o_
  89. arune tmolitor: better to use the file hash as filenamn?
  90. arune And as the plugin is already doing a HEAD request, just use the last-modified from there?
  91. arune Link Mauve: why would you not use it? Privacy?
  92. Asterix the idea that the client (Gajim) automatically download data isn't very safe and you can know my IP easily with that
  93. Link Mauve arune, yeah.
  94. Link Mauve I’d rather use XEP-0231 to download a thumbnail from the other client.
  95. Link Mauve This one would be a very good thing in Gajim core.
  96. arune Would it be better download only was done for messages from ppl in your roster like conversations?
  97. Link Mauve It can still be a privacy issue in that case.
  98. Asterix that could be an option in the plugin yes
  99. Link Mauve I don’t know everyone from my roster for example.
  100. Link Mauve … 297 contacts, that’s way too much…
  101. Link Mauve I should remove some of them, including those from dead servers like gmail.com.
  102. arune tmolitor: caching the images... Wouldn't that need some cleaning mechanism?
  103. arune Hash of file is a terrible idea, URL is better
  104. Link Mauve I think he meant hash of the URL.
  105. arune He did but I suggested the file, don't know what I was thinking