Gajim - 2019-01-25

  1. porrier In the contextmenu of an account I see destroyed rooms still. Will they disappear after some time?
  2. Ge0rG good morning together. I was made aware that the clients-icons plugin won't properly display yaxim in MUCs, and so I wondered which attribute is used when
  3. Ge0rG unfortunately, the plugin code is so full of awkward array split operations that I gave up understanding it
  4. oli Ge0rG: feel free to rewrite everything and submit a MR / PR 😂
  5. Ge0rG oli: sure, I'll just delete the parts I don't understand.
  6. Ge0rG `git rm -rf *`
  7. oli Gajim 2.0
  8. lovetox Ge0rG, i can have a look later
  9. lovetox its sadly not so easy to parse the client, because some clients change the client string from version to version
  10. lovetox whats the current string you use Ge0rG ?
  11. Ge0rG lovetox: apparently the plugin will "detect" yaxim based on the caps URL which I never have used.
  12. Ge0rG I'm using "yaxim" as the identity @name
  13. lovetox so then just put the correct one into that dict
  14. lovetox and its finished
  15. Ge0rG Also wanted to support Bruno, but it looks like it's also using name="yaxim"
  16. lovetox yeah great :D
  17. lovetox and yes the plugins code is a bit horrible
  18. Ge0rG And so I thought it might be good to fix that, and also make a proper caps node URL instead of ""
  19. Ge0rG (which Gajim should assign to Xabber, but it doesn't happen in practice)
  20. Ge0rG But then I wondered if that CLIENTS array is indexed by caps node URL, name or whatever.
  21. lovetox yeah, i take a look in the evening, i ping you later
  22. lovetox but its always amazing to me how many people want to know what client the contact uses
  23. lovetox i couldnt care less
  24. Ge0rG yeah!
  25. lovetox Ge0rG, im getting this from your account
  26. lovetox <query xmlns=""> <identity type="pc" name="Smack" category="client" />
  27. Ge0rG That's even more wrong. Need to beat up Smack4
  28. ta "Let me just fix this small bug..." said no xmpp developer ever ;-)
  29. lovetox :D
  30. Ge0rG Recently I looked into poezio's error log, and found a bunch of bugs in avatar and caps handling.
  31. lovetox So what should i add now Ge0rG
  32. lovetox node = ?, name = ?
  33. Ge0rG lovetox: name = "yaxim", node = "" (but I'm going to change that)
  34. Ge0rG name="Smack" is an inofficial beta
  35. lovetox ok, i will add some documentation to the plugin code so its easier for contributors in the future to add own dict entrys
  36. Ge0rG lovetox: could you also add name="Bruno" -->
  37. lovetox yes
  38. lovetox whats Bruno?
  39. lovetox a yaxim fork?
  40. Ge0rG lovetox:
  41. ta btw, i like the plugin, so thanks for working on it.
  42. ta wow, someone fell for :-(
  43. ta and Movim seems to be missing. Thats what i noticed.
  44. lovetox hm no, but maybe they changed their name or node
  45. lovetox its added with '': ['movim.png', 'Movim'],
  46. ta I have no idea about that. Just spied on some users ;-)
  47. qrsBRWN How do I stop using the gnome-keychain for an account in gajim? I can't seem to figure out where those settings are :(
  48. Ge0rG lovetox: could you also replace '' with ''
  49. Ge0rG oh, and the most important one: "Yaxim" --> "yaxim"
  50. Ge0rG I have no idea who calls it Yaxim
  51. qrsBRWN Found it. Next step is to use my kerberos ticket for auth
  52. Dino from Broadway Hi! I'm a yaxim user.
  53. gutigen qrsBRWN: omg you are bragging in every room 🙃
  54. lovetox qrsBRWN, i doubt you can make kerberos work with Gajim, but please report the result :)
  55. qrsBRWN Gajim should support GSSAPI according to data from different tickets in the bug tracker
  56. qrsBRWN Docs seems hard to find though
  57. qrsBRWN gutigen my life is so awesome that if I divulge anything about it it comes of as bragging
  58. gutigen 😎
  59. lovetox Ge0rG, do you think it makes even sense to depend on the node for the icon?
  60. lovetox is only the name not enough?
  61. gutigen wait what
  62. fm hi! I'm the guy who initially contributed the syntax highlighting plugin
  63. fm didn't have time to port it until recently...
  64. fm had a look at it last weekend and already got it back working again and started to rework larger parts of the code
  65. fm (as the code is.... well, let's call it suboptimal...)
  66. lovetox great to hear :)
  67. lovetox we have a little change now with plugin branches
  68. fm one of the questions i wanted to ask here ^^
  69. lovetox yeah so previously the plugin would have to be compatible to all the wished gajim versions, and this was quite messy over time
  70. lovetox now we have a plugin branch for every major Gajim version
  71. fm i've seen that
  72. lovetox and the branches correspond to each other
  73. lovetox so master plugins = master gajim etc
  74. lovetox so if you want people to use it on a released version of Gajim
  75. lovetox i would start to make it work on gajim_1.1 branch
  76. fm ok, sounds good
  77. lovetox you commit a MR to whatever branch you made the plugin work on
  78. fm as i am using gajim 1.1 for testing, i guess that makes sense
  79. fm ok
  80. lovetox ah and about min max version in the manifest
  81. lovetox min_gajim_version: 1.1.0 max_gajim_version: 1.1.90
  82. lovetox for example to limit it to the 1.1 future Gajim bug fix versions
  83. lovetox and this is how we want it to be, we will not break the plugin on any 1.1.x bug fix version
  84. fm got it ;)
  85. lovetox i would suggest you fully concentrate for now on 1.1
  86. lovetox as master is very unstable and is developed for a longer time and probably breaks APIs
  87. lovetox if we call out beta for 1.2 this would be the time where you adapt the plugin to the 1.2 branch
  88. fm i found some notes to my future self (who is i now, i guess...) from back in the days. saying that i should use gui extension points intstead of the textbuffer.connect method that i used until now.
  89. fm is there a nice list such as for the events for extension points?
  90. fm currently i am playing around with print_real_text
  91. fm lovetox, ok, i will take the 1.1 to start with
  92. lovetox your plugin does not really depend on any xmpp specific stuff
  93. fm nope
  94. lovetox so i think its very unlikely that it will often break,
  95. lovetox the gui extension point print_real_text is perfect i think
  96. fm nice, so i got that right ^^
  97. lovetox there are others but nothing that would help you
  98. fm ok
  99. lovetox the only thing im wondering now is
  100. lovetox after you modified text in print_real_text
  101. lovetox gajim afterwards runs recognition for sepcial text
  102. lovetox like URLs or emojis or stuff
  103. lovetox and converts them for example to real links
  104. fm sounds like i want to hook into that?
  105. lovetox do you think this is a problem?
  106. fm maybe...
  107. lovetox hm k let me look how we can solve this
  108. fm but if there is a chance to use that, i can use it to search for the @@, too
  109. fm i already changed the code to play more nice and not delete any contents just so that it can replace the same text with highlighted versions of the same text...
  110. lovetox no you can search with that, the detection regexes are not available for plugins
  111. fm previously, it actually deleted the text in between two instances of the @@ marker and replaced it with highlighted versions...
  112. fm oh, ok
  113. lovetox ok but this detection is not a problem
  114. lovetox after you modified the text
  115. lovetox set plugin_modified=True
  116. lovetox on the object that is passed as first parameter
  117. fm on the text view, iirc?
  118. lovetox then no further gajim textview code will run
  119. fm but that affects the entire message, right?
  120. lovetox yes
  121. fm is it possible to mark a region of the text as "not url/emoji" (set plugin_modified for a region)?
  122. lovetox no
  123. lovetox but does this really happen, do you want stuff converted inside code tags
  124. fm hm... i used to have emojis or urls in the same message as the code block....
  125. fm nope, other way around
  126. lovetox then simply dont set plugin_modified true
  127. lovetox then the gajim code runs
  128. lovetox you can choose
  129. fm ok, could make this an option, too^^
  130. lovetox if you look for some code to copy for a plugin config window
  131. lovetox you can look at the url_image_preview plugin
  132. fm the plugin actually already has a config window, for choosing the default programming language
  133. fm and to enable line breaks being inserted before and after the code blocks
  134. lovetox ok than never mind
  135. fm ;)
  136. fm btw: will inserting line breaks (currently, simply inserting '\n') break something with the message correction feature?
  137. lovetox i dont think so, i think the message is saved before you modify it
  138. lovetox the message correction does not pull the last text from the textview
  139. lovetox it saves the incoming last message
  140. lovetox and paste it into the textview on correction hotkey
  141. fm ah, ok
  142. fm makes sense
  143. lovetox so it doesnt matter what you draw into the textview, on correction it should show the original message
  144. lovetox but i guess this is easy to test :)
  145. fm true^^
  146. fm ok, so i will cleanup the remaining parts of the code, once i'm done i will open a PR/MR
  147. lovetox yeah great, btw im not against adding stuff to the Gajim codebase if it makes sense and is useful for plugins, just if come across something you want to do but is not possible yet
  148. fm i think, allowing custom regexes to add markers to messages would be a great thing, also for other plugins
  149. fm the latex plugin is doing basically the same thing
  150. fm plus it has to call an external program, but that's another topic
  151. fm don't know if adding custom plugin regexes fits to the current design
  152. lovetox ok, but this is possible now or not? you have the full text, match it with whatever reggex you want and act on it or?
  153. fm that's what i'm doing right now
  154. lovetox Gajim only provides emoji detection (only on Windows, on Linux you use a emoji font) and URL detection
  155. fm it works, ofcourse, but i think it would be nice to have something like the extension points that can take a function plus a regex
  156. fm so people don't have to repeat these code blocks in all plugins
  157. lovetox yeah a regex and a callback
  158. fm yap
  159. fm i think, most plugins working on the message texts are using variations of the same code to find and act on their specific patterns
  160. lovetox yeah, if i think about it this would be nice, maybe chaining up some regexes
  161. fm i'm thinking, if it could be used for optimizations, too....
  162. fm so not each and every plugin has to go through the same message over and over again
  163. Orhideous Logs. All chat logs for several years, all private messages, more than 250 MB in the sqlite database, were lost due to some kind of error in gajim. Now I have serious problems. I am looking for a way to recover them from a broken file.
  164. lovetox download some application that can open sqlite databases
  165. lovetox and look if the data is corrupted
  166. Orhideous Dumped all logs.
  167. Orhideous I am so relieved. I have never been so worried about data loss. Probably, I’ve had enough, I’ll go and make a history plugin that will write messages to a remote database.
  168. ta And Backups!
  169. ta So you only lose some days at max.
  170. lovetox Orhideous, i would write a simple plugin that exports the data to something you can grep
  171. lovetox and also 250 MB database will slow Gajim down on every database operation
  172. lovetox no on every, but when we have to deduplicate messages
  173. Orhideous I never delete message history and store everything. Yes, there are backups, but they are in AWS Glacier and were last made a month ago. Thank you very much for the help, but I think I can deal with manual importing.
  174. Orhideous lovetox: And, perhaps, Gajim was not intended to work with such a large number of logs?
  175. lovetox Gajim has no limit on logs, but as every database the bigger it is the slower every request gets
  176. lovetox but if you dont see a problem, i guess 250 MB is ok
  177. lovetox wonder what error made you think the database is broken?
  178. Orhideous Gajim refused to start. Oooookay, sqlite logs.db Unable to open database "logs.db": file is encrypted or is not a database
  179. lovetox weird error never saw it
  180. Orhideous Whoa. It works.
  181. Orhideous But, nevertheless, for effective search in logs, I will soon need ElasticSearch or Sphinx. At least I know two people who set up * automatic * mirroring of Gajim logs from Sqlite to ES
  182. Orhideous But, nevertheless, for effective search in logs, I will soon need ElasticSearch or Sphinx. At least I know two people who set up *automatic* mirroring of Gajim logs from Sqlite to ES
  183. Orhideous It sounds a little crazy, but their log volume has exceeded 2 GB.
  184. Orhideous (and it was 1 year ago)
  185. lovetox that is indeed crazy :D
  186. Orhideous Although the technical side is nothing complicated: just one Python daemon that periodically polls db for new messages.
  187. bot Arthoqox created an issue in _gajim_ < >: #9561: < A programming error has been detected. >
  188. bot Philipp Hörist created an issue in _gajim-plugins_ < >: #384: < A programming error has been detected. >
  189. bot Philipp Hörist closed an issue in _gajim_ < >: #9561: < A programming error has been detected. >
  190. bot Philipp Hörist modified an issue in _gajim-plugins_ < >: #384: < A programming error has been detected. >
  191. Ge0rG lovetox: re node vs name: do you disco#info everybody, or are you only having presence from some clients?
  192. lovetox i already solved it
  193. lovetox i use now a dict key is the node, and value is another dict that has name: file.jpg
  194. lovetox thats so we can have different icons for different client names, but they all use same node
  195. bot Daniel Brötzmann modified an issue in _gajim-plugins_ < >: #384: < [OpenPGP] TypeError in list2cmdline, argument of type 'bool' is not iterable >
  196. lovetox ta, you said you use client icons
  197. lovetox would it be enough for you to see the icons in the contact tooltip
  198. lovetox ?
  199. lovetox because in roster i find it misleading, because we only show one icon, and a contact can have multiple resources/clients running
  200. lovetox Ge0rG, do you have that bruno picture as svg?
  201. wurstsalat I also found this to be confusing with one single icon in the roster