Gajim - 2015-12-13


  1. kalkin So I'm looking at the otr plugin
  2. kalkin It hooks in for message-outgoing with ged.OUT_PRECORE
  3. kalkin I just copy pasted this in various places, I also found the different stages in gajim/src/common/ged.py
  4. kalkin Is there some documentation on this stages?
  5. kalkin Basicly my plugin works only because I reverse engendered other plugins. Besides the list the PluginEvents I found no up to date documentation. Only some documented research. Am I missing something?
  6. kalkin Also where is the difference between message-outgoing and gc-message-outgoing
  7. Asterix kalkin: the guy who implemented the plugin system wrote that: https://trac.gajim.org/wiki/PluginSystem
  8. Asterix gc- means groupchat
  9. kalkin Asterix: thanks for the reply
  10. kalkin I read the page already. Forgot to mention it also
  11. kalkin So I get a message I decrypted it how do I push it to the ui? I see that the otr plugin just does event.stanza.setBody()
  12. kalkin and also event.msgtext = msgtext
  13. kalkin I tried that but the msg is not shown in the ui
  14. Asterix normally, your plugin get the message event, you modify it and you return. Then the event continue its way and should go to GUI by itself. if you return True at the end, message propagation is stopped
  15. kalkin Asterix: I'm doing that.
  16. kalkin here is the code called on 'message-received' event https://paste.gajim.org/view/e9f91689
  17. kalkin normally where you see BULLSHIT there should be the decrypted msgtext
  18. kalkin the point is that BULLSHIT is not showing in the ui
  19. Asterix kalkin: could you give me the full plugin so I can debug and see what happens?
  20. kalkin Asterix: sure? because you have to install dependencies and so on. It's not like you could just do git clone
  21. kalkin Asterix: may be the OMEMO messages are missing some thing which Gajim requires to consieder them as a realy chat message? I tried setting msg.mtype and msg.stanza.setAttr('type', 'chat')
  22. Asterix ha ... ok I'll create a dummy plugin then to test
  23. kalkin Asterix: Can you direct me to a plugin which modifies an incoming message before writing it to the ui?
  24. kalkin prefereably something simple
  25. Asterix let me check that
  26. Asterix the google_translation plugin does
  27. Asterix it only modifies obj.msgtxt
  28. kalkin Asterix: but it uses another event
  29. kalkin it uses 'decrypted-message-received' and ged.PREGUI or it does not matter?
  30. Asterix could you print a obj.stanza to see what it looks like?
  31. kalkin Asterix: it's still does not work
  32. kalkin just a sec
  33. kalkin Asterix: https://paste.gajim.org/view/2116354b
  34. Asterix ho yes things are missing, like a body
  35. kalkin Asterix: I tried to set the body via msg.stanza.setBody() or should i do msg.stanza.addTag('body'....)
  36. kalkin ?
  37. Asterix wait, I'm reading code
  38. Asterix if you run gajim with -v, do you see the DecryptedMessageReceivedEvent created?
  39. kalkin Asterix: yes i do https://paste.gajim.org/view/b3a39ae1
  40. Asterix then I see no reason ... are there many deps I have to install to try your plugin?
  41. kalkin I think everything you can get from pip
  42. kalkin I'm preparing it for pushing to github and will write down the deps here
  43. Asterix ok perfect
  44. kalkin Asterix: give me 5-10 minutes. thank you for your offer :)
  45. Asterix and you send encrypted messages with conversation?
  46. kalkin (to help)
  47. kalkin yes
  48. kalkin https://github.com/kalkin/gajim-omemo
  49. kalkin Asterix: btw currently the plugin will autorespond
  50. kalkin to an omemo message
  51. Asterix what should I install from pip?
  52. kalkin oh sorry
  53. kalkin sqlite python-axolotl cryptography
  54. daniel Even if we manipulate Conversations to add a body element it doesn't change anything. Best case scenario it shows the original body and now the one we tried to set in the event handler (the code does get invoked though)
  55. Asterix ho no, Conversation don't need to be changed for sure!
  56. daniel s/now/not
  57. daniel Asterix: yeah I just did it for testing
  58. Asterix even with plugin enabled, the OMEMO entry in conversation is grey and I can't check it
  59. kalkin Asterix: you have to press the publish bundle
  60. kalkin Button
  61. Asterix where is it?
  62. kalkin If you open a chat window to anyone and have omemo plugin enabled you should see three buttons
  63. Asterix ha yes ok
  64. kalkin Asterix: it's a developer version 😊
  65. Asterix sure
  66. Asterix but that's not enough
  67. Asterix that doesn't help
  68. kalkin can you do -l plugin_system.omemo=DEBUG ?
  69. kalkin you can also try to press "Clear Devices" and after that "Publish Deveices"
  70. kalkin s/Publish Devices/Publish Bundle/
  71. Asterix after a clear / publish it works
  72. 0xAFFE kalkin, awesome! just saw your take on the omemo plugin
  73. kalkin 0xAFFE: thanks, but it's to early to be usable yet ;)
  74. Asterix got a traceback on receiving a OMEMO message: 12/13/2015 15:32:00 (E) gajim.c.ged Error while running an even handler: <bound method OmemoPlugin.message_received of <gajim-omemo-master.OmemoPlugin object at 0x7eff5ea97cd0>> Traceback (most recent call last): File "/home/asterix/gajim_0.16/src/common/ged.py", line 93, in raise_event if handler(*args, **kwargs): File "/home/asterix/gajim_0.16/src/plugins/helpers.py", line 107, in wrapper result = f(*args, **kwargs) File "/home/asterix/.local/share/gajim/plugins/gajim-omemo-master/__init__.py", line 89, in message_received msgtext = self.decrypt_msg(msg) File "/home/asterix/gajim_0.16/src/plugins/helpers.py", line 107, in wrapper result = f(*args, **kwargs) File "/home/asterix/.local/share/gajim/plugins/gajim-omemo-master/__init__.py", line 106, in decrypt_msg plaintext = state.decrypt_msg(result) File "/home/asterix/.local/share/gajim/plugins/gajim-omemo-master/state.py", line 154, in decrypt_msg result = aes_decrypt(key, iv, payload) File "/home/asterix/gajim_0.16/src/plugins/helpers.py", line 107, in wrapper result = f(*args, **kwargs) File "/home/asterix/.local/share/gajim/plugins/gajim-omemo-master/state.py", line 221, in aes_decrypt backend = default_backend() File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 40, in default_backend _default_backend = MultiBackend(_available_backends()) File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 26, in _available_backends for ep in pkg_resources.iter_entry_points( File "/home/asterix/gajim_0.16/src/common/demandimport.py", line 86, in __getattribute__ self._load() File "/home/asterix/gajim_0.16/src/common/demandimport.py", line 58, in _load mod = _origimport(head, globals, locals) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3084, in <module> @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3070, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3109, in _initialize_master_working_set add_activation_listener(lambda dist: dist.activate()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 965, in subscribe callback(dist) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3109, in <lambda> add_activation_listener(lambda dist: dist.activate()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2625, in activate fixup_namespace_packages(self.location) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2226, in fixup_namespace_packages _imp.acquire_lock() File "/home/asterix/gajim_0.16/src/common/demandimport.py", line 86, in __getattribute__ self._load() File "/home/asterix/gajim_0.16/src/common/demandimport.py", line 58, in _load mod = _origimport(head, globals, locals) ImportError: No module named _imp
  75. kalkin Asterix: hmm you are missing some dependency i think
  76. kalkin Asterix: I think this is some issue with the cryptography module
  77. kalkin Asterix: btw i'm using python2.7 may be the cryptgraphy module differes there
  78. kalkin Ahh i see you also use 2.7
  79. kalkin Asterix: the cryptography api needs a backend. it can use openssl. as i installed it via pip i also had to install openssl-devel library from Fedora
  80. kalkin have also a look here https://cryptography.io/en/latest/installation/
  81. kalkin Hi
  82. kalkin Huhy
  83. kalkin Bjj
  84. kalkin Fyy
  85. kalkin Sorry
  86. kalkin Wrong channel
  87. kalkin Asterix: we got it
  88. kalkin msg.msgtxt not msgt_e_xt
  89. kalkin and use PRECORE and not CORE
  90. Asterix sorry I have to go, I'll continue looking this evening
  91. daniel #python
  92. kalkin Asterix: we found the error. Thank you very much for your help
  93. kalkin daniel: but we saved boilerplate!
  94. Asterix excellent
  95. kalkin Asterix: Fun stuff. You need to set msg.msgtxt to set the text, but you have to use msg.stanza.setBody() call once
  96. kalkin it also does not matter what you set via setBody(), the displayed text will be taken from msg.msgtxt, it is just important that the stanza has a body for gajim
  97. kalkin otr also solved it this way
  98. kalkin but this is weird
  99. kalkin Also funny the notifications show the content of msg.stanza.body but gajim uses msg.msgtxt for displaying in log
  100. Ralf I just changed the certificate of my server to a new one, signed by Lets Encrypt. still I got a message from gajim, informing me that the certificate changed. is this message supposed to appear even if the new certificate is valid? (I verified by logging in with pidgin that the cert is valid and the cert chain is properly supplied, pidgin connects without any message)
  101. ThUnD3r|Gr33n someone here who got spectrum2 running on a pi?
  102. bot RSS: Feeds for Gajim • Ticket #8200 (Request: option to choose status after returning from "auto away") created problem When the online status had been set to "away" / "not available" by "Auto Status" and I return to the computer, the wakeup event triggers Gajim to return to the previously selected status. When I just want to quickly check something at the computer after having been away for a while, I'd wish to be able to supp[…] https://trac.gajim.org/ticket/8200
  103. Asterix Ralf: yes, we show the dialog even if cert is valid. I'm not sure we should ...
  104. Link Mauve I think that’s a good thing to show a change of certificate, but you should also mention it is valid.
  105. Asterix user don't care that we change cert every month (that's nearly what will happen with letsencrypt
  106. Holger I had quite a number of support requests from users in panic last time we updated our certificate :-)
  107. Link Mauve Ugh…
  108. Link Mauve Alright, so first educate users, then—
  109. Asterix Users won't check all certs of all website they visite. It's the same with xmpp certs. Cert will change often, and they won't go to the server website to check the fingerprint every month
  110. Holger Link Mauve: Well I don't remember the details, but I think the Gajim dialog did make it look like something might be wrong.
  111. Holger I'm happy if users are educated to take certificate warnings seriously, so personally I'd avoid such popups if everything is fine.
  112. Link Mauve Yeah.
  113. arune Asterix: soo let's encrypt for the gajim website?
  114. Asterix I am testing scripts on other of my websites, so gajim.org will arrive soon
  115. arune Nice!
  116. Asterix done
  117. Link Mauve Now HSTS?
  118. Asterix yes I can bring it back now
  119. Asterix done
  120. Link Mauve Perfect. \o/
  121. arune Asterix: wonderful!
  122. arune Ah not on trac.gajim?
  123. Asterix not yet ...
  124. Asterix will continue to update all my websites later ...
  125. arune paste.gajim and conference.gajim would also be cool ☺
  126. arune Great!