Gajim - 2016-12-04


  1. Br0nek Asterix, hi, are you here?
  2. Asterix yes
  3. Br0nek Can you send system message to br0nek@gajim.org? :)
  4. Asterix I send system message to all connected users. But yes I can
  5. Br0nek My xml console was closed
  6. Asterix ready?
  7. Br0nek Yes
  8. Asterix done
  9. Br0nek Nothing O_o
  10. Br0nek I disabled plugin, try again
  11. Asterix 2 minutes
  12. Asterix ready?
  13. Br0nek Нуы
  14. Br0nek yes
  15. Asterix hmmm strange. I don't get it on my test account
  16. Br0nek Yes and xml consile is clear
  17. Br0nek console*
  18. Asterix service unavailable
  19. Asterix ha I need a module. Let me install it
  20. Br0nek ))
  21. Asterix ready?
  22. Br0nek yes
  23. Asterix hmm still service unavailable :/
  24. Br0nek Probably you need restat service?
  25. Br0nek restart*
  26. Asterix in theory, I just need to module:load('accounce', 'gajim.org')
  27. Asterix in theory, I just need to module:load('announce', 'gajim.org')
  28. Asterix Br0nek: did you get it?
  29. Asterix here is the XML: <message type='headline' to='JID' from='gajim.org'> <body>This is a test message. Please ignore it.</body> <subject>test</subject> </message>
  30. Br0nek yes, i received message
  31. Br0nek type is 'headline' - this type will not fall under the spam
  32. Br0nek And it means that I am ready to release new version of anti_spam plugin
  33. Asterix good
  34. Asterix I'd be so happy you provide a version for gtk3 branch. I could use it too
  35. Br0nek How can I run gtk3 version on Windows?
  36. Br0nek I created merge request
  37. arune Br0nek: there should be a nightly in the downloads somewhere
  38. Asterix hmm there are test builds under windows: https://gajim.org/downloads/snap/win/Gajim-16.10.1-72bcd2e76aaf.exe
  39. Asterix is migration gajim project from trac to gitlab
  40. Asterix is migrating gajim project from trac to gitlab
  41. Br0nek (Y)
  42. arune 👌
  43. Asterix Br0nek: what does that mean: Chat between the two antispam plugins
  44. Br0nek if two users have this plugin enabled, when you write to user, his anti_spam send you question and your antispam send question to reply. And this is loop
  45. Asterix ok
  46. Br0nek All this messages in background
  47. Asterix if self.config['conference_white_list'].count(jid) == 0 should be if jid in self.config['conference_white_list']
  48. Link Mauve Br0nek, shouldn’t you do that only once instead?
  49. Br0nek Link Mauve, at this moment plugin will send question for all incoming messages that not in roster or white
  50. Link Mauve That’s a very bad idea. :)
  51. Br0nek What if real user will send me message, then plugin will reply and this user accidentally closed chat window and didn't see anti spam question?
  52. Asterix Br0nek: you use 'list.count(val)' everywhere. 'val in list' is nicer
  53. Br0nek Asterix, ok, I'll change it
  54. Br0nek Asterix, should I change this line: if self.outgoing_jids.count(obj.jid if obj.mtype == 'normal' else obj.fjid): ?
  55. Asterix hmm I don't really like the count() call. We don't need to know how mny is in the list.
  56. lovetox self.outgoing_jids.count(obj.jid if obj.mtype == 'normal' else obj.fjid)
  57. lovetox what does this line do?
  58. lovetox i didnt know that you could do something like that in python
  59. lovetox Br0nek, if you want to know if a list is empty
  60. Br0nek lovetox, this line test if obj.jid in outgoing_jids list for 'normal' messages and obj.fjid for 'chat' messages
  61. lovetox ah so if we have "normal" we use jid, otherwise fjid, for the count methode
  62. Br0nek yes
  63. lovetox hm i would do it like this
  64. Br0nek this is standart ternary operation in puthon
  65. Br0nek python*
  66. lovetox yeah its just that count() is not very readable and easily understandable
  67. lovetox hm maybe. if obj.jid in self.outgoing_jids or obj.fjid in self.outging_jids:
  68. lovetox and that: if self.outgoing_jids.count(i) == 0 probably
  69. lovetox if i not in self.outgoing_jids
  70. Br0nek yeah, second suggestion is fine
  71. lovetox and
  72. lovetox if obj.receipt_request_tag and obj.mtype == 'chat':
  73. lovetox oh
  74. lovetox becaus we drop the message
  75. lovetox we dont send out a receipt..
  76. lovetox hm
  77. lovetox but
  78. lovetox is this not kind of wrong
  79. lovetox because you signal the contact you received the message
  80. lovetox when in reallity you droped it and the user didnt see it
  81. lovetox i would find it more logical to extend the anti spam question with a notice
  82. lovetox that the last message and all follwing will not receive the user
  83. lovetox right now we expect everyone to know exactly how the plugin is working, a user might be thining after answering the message the user gets the original first message
  84. Br0nek Definitely I will not save all incoming messages and show them in chat after user pass anti spam question. In README file written that all messages before answer of anti spam question will lost
  85. lovetox yeah but how should someone know this that writes you?
  86. Br0nek Open README)
  87. lovetox what? a random person on the internet writes you a message
  88. lovetox gets a question back
  89. Asterix so when ppl send me a message, he has to guess I use this anti-spam plagin and open this README file?
  90. lovetox and then you expect him to google your client, google your plugin, and read the readme
  91. Br0nek Ok, I can add notice in antispam question. This is not a problem)
  92. lovetox yeah something along the lines: Your message didnt reach JID, because of anti spam plugin, please first answer the question correctly and re send your message again
  93. lovetox or something like that
  94. Asterix and I also wonder if you should reply to receipt
  95. Asterix in one sens, yes we got the message (but dropped it)
  96. Asterix receipt is for message reception, right! not message shown
  97. Asterix so replying to it sounds good
  98. lovetox yeah .. i think both metods could be argued
  99. lovetox when now thinking about it, i also tend to sending a receipt
  100. lovetox because it doesnt mean shown
  101. Br0nek I didn't understand what do you mean. Should I remove receipt.setTag('received' for incoming messages or not?
  102. Asterix no
  103. Asterix keep it
  104. Br0nek Ok, all that I need is add notice in the question, right?
  105. Asterix yep
  106. Br0nek Done. Changes was pushed
  107. Asterix Gajim project is now available at https://dev.gajim.org/gajim/gajim/. Forget trac and mercurial
  108. Asterix help is welcome to work on wiki
  109. Br0nek Great
  110. Br0nek Asterix, how to get gajim 0.16.10 with gtk3 in debian?
  111. Br0nek I tried to use gajim-nighly in deb repository but got 0.16.6
  112. Br0nek gajim-nightly*
  113. lovetox gajim-nightly-default
  114. lovetox thats the package
  115. lovetox or gajim-default-nightly
  116. lovetox i cant remember
  117. lovetox Br0nek
  118. Br0nek ok
  119. lovetox you may want to specify a nother user directory
  120. lovetox with the -p switch
  121. lovetox because otherwise it will use the same as your 0.16
  122. lovetox and plugins will not work in both branches
  123. Br0nek Ok, thanks.
  124. lovetox no sorry, its actually
  125. lovetox -p PROFILE -c PATH
  126. lovetox wit -p you choose another profile, this could work also but i not tested it
  127. lovetox with -c you set the user directory to another path complety
  128. Br0nek How should look like zip-archive with module? I mean what files it should have?
  129. lovetox in what context
  130. lovetox are we talking about plugins ?
  131. Br0nek yes
  132. lovetox a plugin has to contain a __init.py__ with an import of the main plugin .py file
  133. lovetox and special formatted manifest.ini
  134. lovetox there are no other requirements
  135. lovetox i mean the main plugin.py has of course hook intot the plugin.ap
  136. Br0nek I mean if I add plugin folder in zip-archive and choose in gajim install from zip-arhive, will it install this zip?
  137. lovetox just zip the folder of the plugin
  138. lovetox and try
  139. lovetox we have no special archive structure
  140. lovetox its just the git folder zipped
  141. lovetox if you download the plugin its also just a download of a zip
  142. Br0nek Great
  143. Br0nek Thanks
  144. Br0nek As I understand, plugin versions in gtk3 and master(gtk2) should be the same? I mean in mainfest.ini file
  145. lovetox no
  146. lovetox or i actually never thought about it
  147. lovetox yes, probably they should be the same if they contain the same code
  148. lovetox or features
  149. lovetox so if you make a perfect port to gtk3
  150. lovetox they should have the same number
  151. lovetox Br0nek
  152. Br0nek Ok. This is port to gtk3 and have the same code
  153. Br0nek Looks like port is done)
  154. lovetox wait with the commit
  155. lovetox could we change one last thing, im not an native english speaker aswell, but i think we can make that notice message a bit better
  156. lovetox first why are there 2 different messages?
  157. Br0nek First for chat messages, second for direct message ('normal' type)
  158. lovetox yeah but why should there be a difference in the text?
  159. Br0nek When you answer on direct message, gajim paste all text as quoted (in >). In this case if you send correct answer with quoted text anti spam will not accept answer
  160. Br0nek lovetox, where r u from?) Just interesting
  161. lovetox Austria
  162. lovetox a land without spam :D
  163. lovetox do you mean with
  164. lovetox 'Antispam enabled. To confirm that you are not robot please send a message only to answer this question: '
  165. Br0nek yes
  166. lovetox you want to tell the user to delete the ">"
  167. lovetox wouldnt it be easier to search in the string for the answer?
  168. Br0nek Well, this should be new message with answer only
  169. Br0nek Don't think that it good idea
  170. Br0nek There's a possibility that spam can contain answer
  171. lovetox yeah but you could limit that with something like
  172. lovetox answer string should not have more then 3 chars more then the answer
  173. lovetox or something like that
  174. lovetox to account for spaces and such answer added chars
  175. lovetox i mean its not easy to tell a user who never experienced a antispam plugin
  176. lovetox that he has to send exactly the chars you want
  177. lovetox either way
  178. lovetox if you want to keep it exact
  179. lovetox this is true for both chat methods
  180. lovetox so the message could still be the same or not?
  181. Br0nek Yes, it's true for both methods, but 'chat' message is standalone and not dependent on other messages
  182. Br0nek Anyway, stanza should be deferent for methods
  183. Br0nek different*
  184. Br0nek Why is different messages are problem?
  185. lovetox its not a problem
  186. lovetox i try to find out what you want to achieve to formulate a better english sentence
  187. lovetox please send a message only to answer this question:
  188. lovetox this does not mean, send an exact message
  189. Br0nek yeah, you right. Sounds like shit)
  190. lovetox :D
  191. lovetox but i know i struggle with the same things, everytime i have to write dialogs
  192. lovetox i spend a fucking long amount of time to get it somehow right
  193. lovetox and i think we could leave the "robot" out of the message, we can assume after years on the internet with captchas, people know whats tested here
  194. Br0nek There is no native speakers in eng?
  195. lovetox mostly germans and french people ^^
  196. Asterix Br0nek: version number in gtk3 branch is higher. So that ppl installing gajim-default will be upgraded to new plugin version
  197. lovetox nice i never thought about that
  198. Br0nek Asterix, for gtk2 is 0.4.3 and the same code for gtk3 should be 1.4.3?
  199. Asterix yes perfect
  200. Br0nek ok
  201. Br0nek lovetox, what will decide on the anti_spam messages?
  202. lovetox i dont understand the question
  203. lovetox and its important to set a min gajim version in the manifest ini for the gtk3 plugin
  204. lovetox something like 0.16.9
  205. lovetox meh maybe not super important, but it should be there
  206. Br0nek In theory, for 'normal' messages I can ignore strings with '>' at the beginig. And compare each string with correct answer.
  207. Br0nek at the begining*
  208. Br0nek This step prevent to send exact message
  209. lovetox to be honest that part is not so important to me, i just care about the sentence :D
  210. lovetox Antispam enabled. Please answer the question. The message must only contain the answer. (Messages sent before the correct answer is given will be lost)
  211. Br0nek And this step will allow use one sentence for both message types
  212. lovetox yeah thats what i thought
  213. Br0nek (Messages sent before the correct answer will be lost) - why not?
  214. Br0nek I mean is it correct to use "is given "?
  215. lovetox i think its correct, you way is also correct though i would add a ","
  216. lovetox Messages sent before the correct answer, will be lost
  217. lovetox maybe
  218. lovetox hm meh, i think is all correct
  219. Br0nek Ok, to do so)
  220. lovetox do it your way :)
  221. Br0nek Now I'm going to sleep. gn all
  222. lovetox n8
  223. SaltyBones which version of gajim do I need to use mod_http_upload?
  224. lovetox 0.16.5 min i think
  225. lovetox just download it in the plugin manager and see
  226. SaltyBones lovetox, how do I know if it works? :)
  227. lovetox you upload a file
  228. lovetox you see new buttons
  229. lovetox in the chat window
  230. SaltyBones oh
  231. lovetox but your server has to support this
  232. SaltyBones yeah, I just tried to install it on the server
  233. SaltyBones See error log...where is the error log?
  234. lovetox linux?
  235. SaltyBones yeah
  236. lovetox start gajim from console
  237. lovetox with -l gajim.plugin_system.httpupload=DEBUG
  238. SaltyBones URLError: <urlopen error [Errno -5] No address associated with hostname>
  239. SaltyBones strange
  240. lovetox you have propably a server config problem
  241. lovetox you should ask in the prosody room or ejabberd room
  242. lovetox depending on what server you use
  243. SaltyBones scowls.
  244. SaltyBones Yeah, I had the host option of mod_http_upload unset and it prepends upload. to the server which I don't have in dns.