Gajim - 2025-09-28


  1. bot

    lovetox pushed 1 commits to branch gajim/master cfix: Use fast method to delete all history for a contact - https://dev.gajim.org/gajim/gajim/-/commit/0450f87460aa49a495dd0fba9423c7499a0b5d2e

  2. bot

    lovetox pushed 1 commits to branch gajim/master cfix: Add more test for data deletion and fix deletion order - https://dev.gajim.org/gajim/gajim/-/commit/1fd46efaa6823d13a70fd1bc14e17e2ca752c59f

  3. bot

    lovetox pushed 1 commits to branch gajim/master ci: Tests: Shutdown database correctly to silence warnings - https://dev.gajim.org/gajim/gajim/-/commit/cf2e365a557161648772cd54340b05dcd985909b

  4. kalkin

    > I didn't fix anything About this issue: > lovetox: did you fix the issue with d&d pictures or did it fix itself because the latest gnome update changed something? I made an observation that if i d&d a picture open in firefox it works, if i try to d&d it when it is embedded in the page it doesn't.

  5. kalkin

    10:45 in germany, lovetox pushed commits and has now a breakfasty :)

  6. Mad Maestro

    Is Gajim available on android?

  7. Mad Maestro

    I need some help here, Im building a app that uses xmpp in qt, so I use QXmpp, my app was working fine, on armeabi-v7a, I mean android, and desktop before I had the qxmpp in it. Now, it doesnt work. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  8. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp, my app was working fine, on armeabi-v7a, I mean android, and desktop before I had the qxmpp in it. Now, it doesnt work. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  9. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp. My app was working fine, on armeabi-v7a, I mean android, and desktop before I had the qxmpp in it. Now, it doesnt work. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  10. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp. My app was working fine, on armeabi-v7a, I mean android and alsdesktop before I had the qxmpp in it. Now, it doesnt work. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  11. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp. My app was working fine, on armeabi-v7a, I mean android and also desktop before I had the qxmpp in it. Now, it doesnt work. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  12. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp. My app was working fine, on armeabi-v7a, I mean android and also desktop before I had the qxmpp in it. Now, it doesnt work for android. I installed qxmpp through dnf for m fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  13. Mad Maestro

    I need some help here, Im building an app that uses xmpp in qt, so I use QXmpp. My app was working fine, on armeabi-v7a, I mean android and also desktop before I had the qxmpp in it. Now, it doesnt work for android. I installed qxmpp through dnf for my fedora pc. But apparently if I want it for an android app, I need to build it for android? I need to know, how to make qxmpp work for android.

  14. agh-j

    Mad Maestro: Can you cross compile qxmpp? GCC and binutils have ARM and Android targets.

  15. Mad Maestro

    I need to clone the repo, and cross compile, and add the path in CMAKE_MODULE_PATH?

  16. agh-j

    Mad Maestro, xmpp:programming@chat.cluxia.eu?join is probably a more appropriate MUC.

  17. Mad Maestro

    I came here, because gajim uses qxmpp

  18. agh-j

    I have not cross compiled anything for a couple of years, and then, it was only FreeBSD to MinGW-w64

  19. agh-j

    Mad Maestro, Gajim does not use qxmpp, Kaidan does.

  20. Mad Maestro

    Okay, do u have the kaidan invite

  21. agh-j

    No

  22. agh-j

    I have no idea if Kaidan has a MUC

  23. agh-j

    Surely, you would prefer a QXMPP MUC?

  24. agh-j

    Anyways, you need a cross compiler toolchain for your host, and target, or you need to build one.

  25. Mad Maestro

    Yeah

  26. Mad Maestro

    > Mad Maestro, xmpp:programming@chat.cluxia.eu?join is probably a more appropriate MUC. is this qxmpp MUC?

  27. agh-j

    No.

  28. Mad Maestro

    Do you have the address of the qxmpp MUC?

  29. agh-j

    Mad Maestro, what XMPP client are you using now?

  30. Mad Maestro

    Im using DIno

  31. agh-j

    Oh the worst.

  32. agh-j

    Mad Maestro, try this xmpp:qxmpp@muc.kaidan.im?join

  33. Mad Maestro

    > Oh the worst. what do u use?

  34. agh-j

    Conversations on Android, and Gajim on FreeBSD.

  35. Mad Maestro

    > Mad Maestro, try this xmpp:qxmpp@muc.kaidan.im?join didnt work

  36. mesonium

    The invite above works fine for me.

  37. bot

    lovetox pushed 1 commits to branch gajim/master imprv: DebugConsole: Disable Stream Management by default - https://dev.gajim.org/gajim/gajim/-/commit/66bd414897b421631e9e4b3cad3f4572cadebb23

  38. nicoco

    lovetox, apologies if this feels pushy, I am just not sure you noticed it: I updated the "unnamed private group" MR and the "displayed markers in MUC" one which have been opened for a long time, and about which we discussed a lot. I think all concerns were adressed. Since we recently exchanged a few messages on some newer ones, I want to say that ideally I would be really happy to actually close these ones first. I have been using them for a long time. It's usually trivial to rebase them on top of master, but I dread the potential commit(s) you push one day that will actually make rebasing a lot more painful. :-)

  39. colinR

    why is this gajim-git lag and consumes alot of cpu its taking 40.9% of my cpu

  40. colinR

    i am on arch linux

  41. mesonium

    colinR: when does it do it? can you profile it?

  42. colinR

    ``` [collins@archie ~/.local/bin]$ ps -p 358319 -o %cpu,%mem,comm %CPU %MEM COMMAND 27.5 7.1 gajim ```

  43. colinR

    as you can see there its now using 27.5 of my cpu and 7.1 memory

  44. mesonium

    You might look into or share the profile file generated with: `python -m cProfile -o gajim.prof path/to/gajim/launch.py`

  45. mesonium

    you'd start Gajim with this command, let it run for a short while, when the CPU usage is high and then quit it.

  46. colinR

    it has created a file

  47. mesonium

    Great, you can visualize it eg with Snakeviz.

  48. colinR

    where do i get snakeviz

  49. colinR

    i dont know because the file is protected its like some sort of encryptation

  50. mesonium

    you can install snakeviz via pip

  51. mesonium

    you can also share the report, it doesn't contain any private data.

  52. mesonium

    https://jiffyclub.github.io/snakeviz/ you can also share the report, it doesn't contain any private data.

  53. mesonium

    or you use this little script: https://stackoverflow.com/a/53978443 to generate a static text file as an output, containing the profile stats

  54. mesonium

    just replace profilingResults.cprof with gajim.prof

  55. lovetox

    nicoco, yes thouse MRs are on the top of my list

    ๐Ÿคฃ 1โค 1
  56. lovetox

    regarding reactions, i dont understand you answer really, the disco info was made "entity specific" what do you mean by that

  57. lovetox

    even the feature keys are named in a way that they make not much sense on a user disco info

  58. lovetox

    "max_reactions_per_user"

  59. lovetox

    this is text i would expect returned by a service

  60. lovetox

    a MUC or a gateway service

  61. lovetox

    if i receive that, then i know this service hat this feature or limitation

  62. lovetox

    why would i need to query every user i encounter?

  63. nicoco

    , output_path: Path, decompress: bool):

  64. nicoco retracted a previous message, but it's unsupported by your client.

  65. nicoco

    haha well I tried to give some context but I made it all confusing oops

  66. nicoco

    so, in the current slidge (=only) implementation this reaction restriction dataform is in the disco#info of: - the MUCs - the "slidge" resource of 1:1 contact (a pseudo-client) It is not in the disco#info the gateway component itself, but I could add it.

  67. nicoco

    > a MUC or a gateway service The intent of llarma was to not make these restrictions "service-wise" (which was my initial idea), but per-MUC. It could be something configurable by room owners, in the muc config dataform (even if there is no implementation so far).

  68. nicoco

    > why would i need to query every user i encounter? Since the spec does not define any "service-wise restrictions", for 1:1 chats it has to be something contact-specific. The disco#info of the "slidge" pseudo-client was the best fit I managed to come up with. Without caps, that would mean needing to disco#info query every contact; but since we have caps, one query to resolve the caps verstring to a disco#info โ€” including the emoji:restrictions dataform โ€” should be enough. I agree that it's not great to rely on the contact being available; in practice, in slidge, when contacts are offline it means the gateway is down and nothing can be routed to them anyway, but that is somehow slidge-specific.

  69. nicoco

    Anyway, what if gajim relied on: - the disco#info of MUCs; - the disco#info of the component for 1:1 contacts. Does that sound good to you?

  70. moparisthebest

    contact-specific or client-specific ? Very different

  71. nicoco

    For real xmpp things, yes. For gateways (at least slidge ones), it's exactly the same. The reason there is a pseudo-client is to "behave as much as possible like any other XMPP contact", but really, it's the same.

  72. lovetox

    nicoco, there is no real and unreal xmpp, the purpose of a gateway is that you behave like xmpp to clients, and clients dont need to care

  73. lovetox

    > Since the spec does not define any "service-wise restrictions", for 1:1 chats it has to be something contact-specific.

  74. lovetox

    the spec says any entity can limit reactions by advertising it in their disco info

  75. lovetox

    a MUC is an entity, a MUC service is an entity, a gateway is an entity

  76. lovetox

    does the user limit reactions in this scenario? no. Its the gateway service that limits reactions, so it should advertise it

  77. lovetox

    If someone decides to implement an option for a MUC Admin to limit reaction, then the MUC entity needs to advertise it

  78. lovetox

    there could still be another limit on the MUC component for example

  79. lovetox

    an entity is responsible for something, and its their job to advertise it. If a user uses a client that only supports one reaction, the client needs to advertise this for its specific assigned resource

  80. lovetox

    so i think its sensible for now to only support usecases that are currently in the wild, or very likely could be soon.

  81. lovetox

    Which means your slidge usecase, which is the gateway itself who imposes that limit

  82. colinR

    i have a problem with gajim when i press add file button my file manager doesnt appear in short its not pressable what might be the issue

  83. hau

    > i have a problem with gajim when i press add file button my file manager doesnt appear in short its not pressable what might be the issue ru using flatpak i had that the other day after i updated gajim but restarting my pc fixed it

  84. colinR

    i am not using flatpak edition i am using the git version of it gajim-git installed from paru

  85. sunglocto

    > i am not using flatpak edition i am using the git version of it gajim-git installed from paru why

  86. colinR

    because i honestly use latest git build i dont like flatpak

  87. colinR

    so how do i get this problem fixed sunglocto

  88. sunglocto

    isn't gajim in the regular arch extra repository?

  89. colinR

    it is there but its not stable as it was so much heavier and lag

  90. lovetox

    you probably need to install some portal

  91. lovetox

    so gajim can access the file dialog

  92. colinR

    which portal

  93. colinR

    good evening lovetox

  94. lovetox

    xdg-desktop-portal xdg-desktop-portal-kde xdg-desktop-portal-gtk xdg-desktop-portal-gnome

  95. lovetox

    one of these, depending on your system

  96. colinR

    i have them installed even before

  97. colinR

    but i can't access it either lovetox

  98. lovetox

    is the button not pressable (disabled) or can you press it and nothing shows up?

  99. lovetox

    its not clear from your message

  100. nicoco

    > nicoco, there is no real and unreal xmpp, the purpose of a gateway is that you behave like xmpp to clients, and clients dont need to care This is precisely the spirit of everything I said? The only time I mentioned "real xmpp" was in reply to moparisthebest, that the contact-/client-specific distinction, in the context of (most, if not all) gateways, was not as straightforward as it is in the non-gateway context.

  101. colinR

    i can you press it and nothing shows up?

  102. colinR

    i can press it and nothing shows up?

  103. nicoco

    > does the user limit reactions in this scenario? no. Its the gateway service that limits reactions, so it should advertise it Fine. As I said, this is what I wanted to do, but llarma thought it was a bad idea, and he's the XEP author.

  104. nicoco

    > a MUC is an entity, a MUC service is an entity, a gateway is an entity You can send chat messages with any entity, and unless specified, there is no automatic inheritance rule from your domain; e.g., my server does not advertise OMEMO support, but my clients do. As a general rule, we do a lot of things that the service does not have special support for, eg, muji (XEP-0272) works with any MUC service. XEP-0444, as it is written right now, says nothing about inheritance from the "bare domain" entity. So, if you read it as it is right now, if "something.example.com" has "allowlist={ ๐Ÿ’ฉ }" it means that, if you implement XEP-0444 v0.2, you are not supposed to react with anything else than ๐Ÿ’ฉ when you chat with xmpp:something.example.com โ€” and the spec nothing says nothing about what it means for xmpp:someuser@something.example.com or xmpp:somegroup@something.example.com

  105. nicoco

    > If someone decides to implement an option for a MUC Admin to limit reaction, then the MUC entity needs to advertise it The MUC entity, meaning the room? Yes, I agree. Did you mean the MUC service, aka the "MUC component"? In this case I disagree, the spec says nothing about that. Maybe it should? It is experimental and easy to change (modulo convincing llarma that changes are worthwhile), so this is open for discussion.

  106. mesonium

    colinR: which DE or WM do you use? Glib uses dbus to request the file picker dialog. So you click on the attachement button, an overlay opens, where you click on "add file"?

  107. nicoco

    My proposal in the MR thread BTW, was precisely to be able to explicitly define an inheritance rule for all entities on a domain, the "domain-wide" restictions. It could be on the disco#info of something.example.com with the dataform we have, but I think it is cleaner if we add an explicit field meaning "these restriction are applied to all entities in this domain", eg, a "scope" field with a value of "domain-wide".

  108. nicoco

    Just so we're clear, I really have no strong opinion about how it should be. I just know that I implement bridges to some networks where the emoji list is a subset of all emojis, and/or only a single reaction per user per message is possible. My discussions with llarma turned my suggestion of "gateway advertises the restrictions on reactions and these apply to all JIDs @gateway" to something that is not gateway-specific at all, and could be configurable on a per MUC basis, or even something that clients could advertise (although it is a bit weird, why not? maybe I don't want anyone to react with ๐Ÿ‡ซ๐Ÿ‡ท when they chat with me because I hate baguettes or something)

  109. colinR

    > colinR: which DE or WM do you use? Glib uses dbus to request the file picker dialog. So you click on the attachement button, an overlay opens, where you click on "add file"? I am using dwm

  110. lovetox

    nicoco, larma said specifically the gateway should not advertise any reaction limits?

  111. moparisthebest

    nicoco, lovetox: does it make sense for that to be disco vs the entity to respond with an error when they get one they don't like?

  112. nicoco

    AFAIR (this was a while ago now), he said if the gateway advertise reaction limits, it means these limits apply to when chatting with the gateway (which is not a human, but you can send chat messages to it nevertheless)

  113. nicoco

    AFAIR (this was a while ago now), he said if the gateway advertises reaction limits, it means these limits apply to chatting with the gateway (which is not a human, but you can send chat messages to it nevertheless)

  114. lovetox

    thats a very weird thing to say

  115. nicoco

    why?

  116. moparisthebest

    especially with regard to limits, I mean in that case it's a race, you don't know if you can react or not? You gotta send and handle an error anyway no?

  117. lovetox

    so if i query a domain.com and it advertises a stanza-limit of 10kb, this means it applies to message i send to domain.com, but not user@domain.ocm

  118. nicoco

    > especially with regard to limits, I mean in that case it's a race, you don't know if you can react or not? You gotta send and handle an error anyway no? slidge sends error messages in reply to reaction it does not accept

  119. nicoco

    in MUCs it's easy, slidge never "echoes" the bogus reaction

  120. nicoco

    in 1:1 though, AFAIK all clients just drop that error message because it is not attached to a message with a body and they don't have any UI to display them (well, psi displays all errors I think)

  121. nicoco

    > so if i query a domain.com and it advertises a stanza-limit of 10kb, this means it applies to message i send to domain.com, but not user@domain.ocm Doesn't the XEP explicitly say "the stanza-limit applies to all JIDs @domain"?

  122. moparisthebest

    let me word it a different way, a client sees a remote entity can only accept 1 reaction, what's it supposed to do with this info?

  123. lovetox

    moparisthebest, send only one reaction, ...

  124. moparisthebest

    if there is currently 0 reactions it can send 1... but what if one was already sent from elsewhere?

  125. lovetox

    its one reaction per user

  126. lovetox

    not one reaction all together

  127. moparisthebest

    and your user has how many clients connected?

  128. nicoco

    > especially with regard to limits, I mean in that case it's a race, you don't know if you can react or not? You gotta send and handle an error anyway no? errors are implemented, for the full story if slidge is a "privileged entity" it will even impersonate you to "sync the XMPP reaction state with the bridged network" to avoid inconsistencies, but ideally clients do better than that

  129. lovetox

    > and your user has how many clients connected? how is that relevant

  130. moparisthebest

    because it's a race right?

  131. lovetox

    if you go on a tangent about race conditions, this is irrelevant for the topic

  132. lovetox

    only because a race condition could exists, does not mean we should not provide proper GUI that tells the user what they can do

  133. moparisthebest

    it's very relevant, my point is knowing you can send at most 1 isn't a full solution, you also have to handle the error when the one you sent didn't win right?

  134. lovetox

    nobody said its a full solution

  135. lovetox

    nobody needs a full solution

  136. moparisthebest

    so if you have to handle that, why not just send the limit there

  137. lovetox

    we just need to know when i disable the button

  138. lovetox

    because then i need to display errors for reactions, and i can not prevent the user from sending it

  139. nicoco

    the way I see it, we don't disable the button, we just change the behaviour from "add another emoji" to "replace the current emoji"?

  140. mesonium

    colinR: sorry, no idea then and no time to help debugging this further unfortunately.

  141. colinR

    No problem I will find a way soon

  142. moparisthebest

    > because then i need to display errors for reactions, and i can not prevent the user from sending it you have to display errors anyway for when you lose the race

  143. lovetox

    no i dont have to

  144. lovetox

    its not even possible to interpret that error currently

  145. lovetox

    we dont store the message id for non-body messages

  146. lovetox

    hence i cannot find anything related to that error

  147. moparisthebest

    that seems to make this useless then?

  148. moparisthebest

    you send a reaction, it may or may not be applied, you don't know

  149. nicoco

    (slidge could attach some more info in the "reaction error" stanza btw, this was your suggestion lovetox on the gajim tracker and plan to experiment with that too)

  150. lovetox

    if you only accept 100% solutions, yes this is not a 100% solution

  151. lovetox

    but i also implement 90% solutions, if the 10% mean work i dont want to do

  152. moparisthebest

    This isn't a 1% solution though lol

  153. nicoco

    don't they say "perfect is the enemy of good"?

  154. moparisthebest

    If reactions matter and you can't accept some for some reason it seems you should have a way to convey that

  155. lovetox

    yes we are working on that currently, the service can convey that via disco info

  156. moparisthebest

    approach it from that angle, and you have a full solution and don't need this disco hack in the first place

  157. nicoco

    > This isn't a 1% solution though lol yes it is. I have not had witnessed a single occurence of something going wrong with reactions since they're implemented in XMPP clients. What we have is a 99,9999% solution.

  158. moparisthebest

    >> This isn't a 1% solution though lol > yes it is. I have not had witnessed a single occurence of something going wrong with reactions since they're implemented in XMPP clients. What we have is a 99,9999% solution. This isn't implemented anywhere though?

  159. nicoco

    (I mean, nothing going wrong, except the cheogram fallback/conversations conendrum but this isn't related to what we're talking about :))

  160. nicoco

    > This isn't implemented anywhere though? AFAIK, all clients just drop error messages in reply to reactions, so yes, what you are worried about is widely out there already.

  161. nicoco

    > This isn't implemented anywhere though? AFAIK, all clients just drop errors in relation to reactions, so yes, what you are worried about is widely out there already.

  162. lovetox

    but nobody except your service sends errors, because servers dont care about reactions normally

  163. nicoco

    connectivity issues are a whole world of things, aren't they?

  164. lovetox

    this was not a accusation, i just mean practically there are not many services that even would implement limits

  165. lovetox

    so this is a solution basically just for gateways

  166. nicoco

    what I meant was you can get an error from your server because the remote server you're sending a message to is offlin

  167. moparisthebest

    >> This isn't implemented anywhere though? > AFAIK, all clients just drop errors in relation to reactions, so yes, what you are worried about is widely out there already. right, I thought you were trying to fix that though? Hence my suggestion as to a real fix vs a more complicated thing that won't fix it

  168. nicoco

    open a 1:1 chat with me, let me shutdown my prosody, send a reaction, your server will reply with an error saying my server cannot be reached, but right now, gajim silently drops it, doesn't it?

  169. lovetox

    yes

  170. nicoco

    > right, I thought you were trying to fix that though? Hence my suggestion as to a real fix vs a more complicated thing that won't fix it these are not mutually exclusive.

  171. lovetox

    i mean .. we could show the error

  172. lovetox

    it does not fix the gui problem that the user then needs first remove his reaction, then change it to something else

  173. nicoco

    > i mean .. we could show the error (I have a local branch where I do, and also opened a nbxmpp MR related to that)

  174. lovetox

    instead of just clicking on something else

  175. moparisthebest

    >> right, I thought you were trying to fix that though? Hence my suggestion as to a real fix vs a more complicated thing that won't fix it > these are not mutually exclusive. but the real fix means you don't need to do the partial fix, vs needing both

  176. lovetox

    which the disco info would allow

  177. lovetox

    the disco info allows for better UX

  178. lovetox

    but realisticly the error showing is also necessary at some point

    ๐Ÿ‘ 1
  179. nicoco

    > (I have a local branch where I do, and also opened a nbxmpp MR related to that) this one <https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/103> โ€” it is very weird that when we fallback to the first available language, we remove the error message. I am almost 100% convinced this was an unintended side effect of using popitem here

  180. moparisthebest

    > but realisticly the error showing is also necessary at some point ๐Ÿ‘

  181. lovetox

    ah yes it was

  182. lovetox

    i must have been drunk

  183. nicoco

    or not drunk enough

  184. lovetox

    also why index 1 is popped

  185. nicoco

    because it returns a tuple (key, value)

  186. moparisthebest

    ๐Ÿ˜‚ obligatory https://xkcd.com/323/

  187. lovetox

    ah, yeah

  188. lovetox

    maybe i thought popitem, does not infact remove it from the dict for some reason

  189. nicoco

    getting _a_ value from a dict is surprisingly convoluted in python

  190. lovetox

    ah you cannot access a dict by index

  191. lovetox

    i wanted the first element

  192. lovetox

    so this is the only way, except for yours converting the dict to a list

  193. nicoco

    as ugly as it looks, `next(iter(dictionary.values()))` seems to be the canonical way

  194. nicoco

    dicts only guarantee ordering of elements since 3.9 or something like that, before that there was no ordering, and we still have https://docs.python.org/3/library/collections.html#collections.OrderedDict in the stdlib as a relic of that time

  195. lovetox

    yes .. even the values obj is not subscriptable

  196. nicoco

    dicts only guarantee ordering of ~elements~ items since 3.9 or something like that, before that there was no ordering, and we still have https://docs.python.org/3/library/collections.html#collections.OrderedDict in the stdlib as a relic of that time

  197. bot

    lovetox pushed 1 commits to branch python-nbxmpp/master fix: Leave text condition in place in CommonError.get_text() - https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0846e1729815b8c62d1a52877842aad9fae0fd6c

  198. nicoco

    > lovetox pushed 1 commits to branch python-nbxmpp/master > > fix: Leave text condition in place in CommonError.get_text() - https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0846e1729815b8c62d1a52877842aad9fae0fd6c > > I made <https://dev.gajim.org/nicoco/gajim/-/commit/63d277a0c6e3d263887be0db0cd058bc7ad0f0f9> in relation to that, but did not submit it as a MR yet because I wanted to test for a few days and make sure all conversation views don't end up filled with useless errors. it does not seem to be the case so far, but I have not been running it for long.

  199. lovetox

    but its against the concept

  200. lovetox

    back then when i remade the db layout

  201. lovetox

    the idea was to have it work, so it does not matter in what direction you request messages

  202. lovetox

    exactly for this purpose that one day we could scroll up and load messages from the server in reverse order

  203. lovetox

    such a change, would then show all errors in the message view

  204. lovetox

    because you did not receive the message for the error yet

  205. nicoco

    oh interesting

  206. nicoco

    well, I did not submit a MR for it anyway ;)

  207. lovetox

    thats why the concept is

  208. lovetox

    store all data without checks in the database

  209. lovetox

    if a message with body comes in i want to display, i join everything thats up to that point in the database

  210. lovetox

    that works for the reverse case

  211. lovetox

    but of course it makes not much sense for reactions

  212. lovetox

    in this case i would filter out in the join reactions that have an error attached

  213. lovetox

    but i have no good way to tell the user the story that back then he send a reaction but it was not received ..

  214. lovetox

    maybe we dont need to do that

  215. lovetox

    maybe reaction errors should be just shown in-time, when they really happen

  216. lovetox

    not when we receive them via MAM

  217. lovetox

    to show them in-time, i dont actually need to store them to the db, i just need to find the reaction it belongs to, at point of receiving

  218. lovetox

    for that the only thing we need to do is, store the message-id under which the reaction was sent

  219. lovetox

    or .. depend on the server adding the context to the error

  220. lovetox

    which is a good enough solution for me

  221. lovetox

    so simply display all errors that have a reaction namespace in it, and are not received via MAM

  222. lovetox

    but with the message-id stored in the db, we could also remove the error reaction from the db

  223. nicoco

    in https://xmpp.org/extensions/xep-0444.html#example-10 there is no reaction namespace anywhere, but I guess you're saying the error-inducing stanza should be "echoed" in there somewhere, right?

  224. lovetox

    errors are allowed to have the offending stanza attached to it

  225. lovetox

    ejabberd does that always to my knowledge

  226. nicoco

    yes, slidge does not do it ATM but I can definitely add it

  227. lovetox

    some other servers dont, its optional

  228. nicoco

    I just have had no good reason to do so yet, but it looks like I'll soon have one :P

  229. lovetox

    but the right solution would be to add a column and store the message id

  230. lovetox

    because without that even when you add the context

  231. lovetox

    i cannot find the reaction in the db

  232. lovetox

    it could be any reaction to messages from that user

  233. nicoco

    (wow, I wrote a unit test for the unnamed-chats branch, applying your suggestion I broke it without noticing, then it was detected by the gitlab pipelin. professionnal software dev stuff happening tonight)

  234. lovetox

    ahhh the context includes the message-id

    ๐Ÿ’ก 1
  235. lovetox

    ...

  236. lovetox

    hmmm i tend to think we can get through with just error context

  237. lovetox

    in my opinion all servers should add the context

  238. lovetox

    its just not a must in the rfc

  239. nicoco

    haven't dived into it much but it feels like you're right

  240. nicoco

    The reason slidge does not do it is that slixmpp does not make it easy. Right now to reply to incoming stanzas with errors in slix, you just `raise XMPPError(condition, text)` in some handler which is butโ€ฆ adding the error-inducing stanza is either quite complex or I just have not found out how. It feels like this is more a slixmpp enhancement than a slidge enhancement to write.

  241. nicoco

    The reason slidge does not do it is that slixmpp does not make it easy. Right now to reply to incoming stanzas with errors in slix, you just `raise XMPPError(condition, text)` in some handler which is quite neat butโ€ฆ adding the error-inducing stanza is either quite complex or I just have not found out how. It feels like this is more a slixmpp enhancement than a slidge enhancement to write.

  242. colinR

    i got it fixed already

  243. lovetox

    > i got it fixed already and what was it?

  244. lovetox

    nicoco, question is if we still needthe disco stuff ...

  245. lovetox

    if we have the error stuff

  246. lovetox

    i dont think we cache errors also, so if you switch away from the chat the user never sees the error

  247. lovetox

    but hard to reach a perfect solution here

  248. nicoco

    > nicoco, question is if we still needthe disco stuff ... I take it you don't like the idea of gajim the behaviour depending on this? I think it was a good way of solving max_reaction_per_user=1.

  249. nicoco

    > nicoco, question is if we still needthe disco stuff ... I take it you don't like the idea of changing the behaviour of "clicking on a second emoji" depending on this? I think it was a good way of solving max_reaction_per_user=1.

  250. colinR

    > and what was it? i think i did not start dbus sessions and xdg-portal

  251. lovetox

    no i have no problem with discoing the domain

  252. lovetox

    i just dont follow the argument that some limitation a service advertises does not apply to the user accounts the service hosts

  253. lovetox

    thats really a weird idea to me

  254. nicoco

    I was talking about GUI here

  255. colinR

    lovetox but the file picker is not resized as its home directory is not seen what would be the issue

  256. lovetox

    we dont offer the file picker, we just send a dbus message to your system to open it

  257. nicoco

    What my MR does is: if max_reaction_per_user=1, then clicking on an emoji when we already sent one does not send <reaction>1st</reaction><reaction>2nd</reaction> but only <reaction>2nd</reaction>

  258. lovetox

    so any problem that you have within the file-picker is nothing gajim can solve

  259. lovetox

    nicoco, yeah i know

  260. lovetox

    im fine with this MR but only if we query the domain

  261. nicoco

    are you fine with this part or not?

  262. nicoco

    ok I understood you right then :)

  263. lovetox

    i think its not worth it if it does only work if a user is "online"

  264. lovetox

    btw, does your gateway convey the status? so removing the resource if someone is offline?

  265. lovetox

    or are the people always online

  266. nicoco

    ok, then we can have both better error handling and a nicer UX for max_reaction=1 then, can't we?

  267. nicoco

    > btw, does your gateway convey the status? so removing the resource if someone is offline? I think no chat service I bridge really has an "offline" concept, but there are "deleted accounts" instead

  268. nicoco

    everybody seems to use "last seen at XXX" now

  269. nicoco

    everybody seems to use "last seen on XXX" now

  270. nicoco

    not sure what you mean by "removing the resource"?

  271. lovetox

    no i mean if presence=unavailable

  272. lovetox

    in xmpp a client that is offline, then there is no resource

  273. lovetox

    meaning no disco

  274. nicoco

    i need to check but it is highly possible that even when the bridged contact sends presence=unavailable, slidge will still reply to disco directed at the offline resource, which is not really consistent but has not caused any issue so far

  275. lovetox

    but no client would do this

  276. nicoco

    yup

  277. nicoco

    I tend to use presence show="xa" instead of offline, as it is a nice hack to have better participant list in most XMPP clientsโ€ฆ

  278. nicoco

    I tend to use presence show="xa" instead of offline, as it is a nice hack to have better participant lists in most XMPP clientsโ€ฆ

  279. lovetox

    anyway, i think larma is wrong here, saying a gateway cannot advertise its limitations on its own disco info, because one would interpret it as only applying to chats with the gateway itself is absurd to me

  280. lovetox

    there is also no need to add any "server-wide" stuff, if i find a reaction limit on a gateway

  281. lovetox

    any sane developer knows thats a limitation of the gateway which applies obviously to all entities reachable over it

  282. lovetox

    and not just to chat messages to the gateway it self

  283. lovetox

    and further the XEP specifically mentions limitations on gateways as the use case for this disco info

  284. lovetox

    i mean if i read the XEP in a vaccum

  285. nicoco

    I'd rather we ask him directly, but IIRC, it's not so much that he had strong opinions about how it should be for a gateway, but rather that he wanted an addition that could work for something else than gateways

  286. lovetox

    how would you even get the idea to advertise this on the resource

  287. lovetox

    i actually think that he doesnt think this is a problem

  288. lovetox

    thats why i asked you if he specifically said this

  289. lovetox

    i also see the problem for you personally here

  290. lovetox

    you can include it on all contacts

  291. lovetox

    i dont care, gajim does not care

  292. lovetox

    i dont see how it can be hurtful to add it on the domain

  293. nicoco

    it does not hurt, but adding a third "scope" field does not hurt either IMHO

  294. nicoco

    it does not hurt, but adding a third field "scope" does not hurt either IMHO

  295. lovetox

    you can add it, but i dont want Gajim querying it, for me there is no confusion what that limit means

  296. lovetox

    this is so far edge case, when would that ever become relevant

  297. lovetox

    only when users could configure themself the limitations on their clients

  298. lovetox

    and that would never be something i would even consider supporting

  299. nicoco

    I'm entirely fine with it and did not expect to check for the scope field whenever I get back to working on this MR :)

    ๐Ÿ‘ 1
  300. nicoco

    I do believe that we might see per-muc emoji restrictions at some point if (a) xmpp becomes more popular for public large groups and/or (b) someone specs and implements "custom emoji reactions" but I am not going to be the one working on that

  301. nicoco

    that's a "later" problem anyway

  302. lovetox

    i mean if a muc defines specific emojis as allowed, i guess they are not many

  303. lovetox

    right now there exists only a allowlist

  304. lovetox

    i can imagine building a custom emoji picker for something like that

  305. lovetox

    its a difference if you need to provide a performant emoji picker for 4000 emojis or for 10

  306. lovetox

    so kind of reverting my statement from earlier that this is not an option in Gajim

    ๐Ÿ˜Š 1
  307. lovetox

    when i back then thought about it, i thought you can disallow one or two emojis

  308. lovetox

    thats a different story

  309. lovetox

    for the dissallow case, error handling is probably the better solution

  310. nicoco

    FWIW, I only encountered this emoji subset thing with telegram, where if you don't pay for telegram premium you can only react with ๐Ÿค“๐Ÿคฌ๐Ÿ‘Œ๐Ÿฅฑ๐ŸŽ‰๐Ÿ’‹๐Ÿ–•๐Ÿ˜๐Ÿ‘€๐Ÿ˜ˆ๐ŸŽƒ๐Ÿ™ˆ๐Ÿ˜‡๐ŸŽ…๐Ÿ˜‚โคโ€๐Ÿ”ฅ๐Ÿ˜ด๐Ÿคทโ€โ™€๐Ÿ“๐Ÿค”๐Ÿ˜ก๐Ÿ†๐ŸŽ„๐Ÿ•Š๐Ÿคก๐Ÿคฎ๐Ÿ˜ฑ๐Ÿ˜๐Ÿ’”๐Ÿ‘Ž๐Ÿ†’๐Ÿคทโ€โ™‚๐Ÿ‘ป๐Ÿซก๐Ÿ’ฉ๐Ÿ‘จโ€๐Ÿ’ปโ˜ƒ๐Ÿ‘โœ๐Ÿฅฐ๐ŸŒญ๐Ÿคฃ๐Ÿ’Š๐ŸŒš๐Ÿ”ฅ๐Ÿ’ฏ๐Ÿณ๐Ÿค—โšก๐Ÿ’˜๐Ÿฅด๐Ÿ™๐Ÿค๐Ÿ˜Ž๐Ÿคท๐Ÿ™‰๐Ÿพ๐Ÿ™Šโค๐Ÿคฉ๐Ÿ˜˜๐Ÿฆ„๐Ÿ—ฟ๐Ÿ˜ญ๐Ÿคฏ๐Ÿ‘๐ŸŒ๐Ÿ‘พ๐Ÿ˜จ๐Ÿ˜๐Ÿคช๐Ÿ’…๐Ÿคจ๐Ÿ˜ข In discord, AFAIK when you pay you have access to custom emojis, mostly

  311. lovetox

    sorry nicoco, i had more comments, just didnt click finish review

  312. nicoco

    damn, good catches

  313. lovetox

    nicoco, so affiliation messages have real jids, so we use now for the groupchat name then the localpart or the nickname we have for this contact assuming we have them in the roster

  314. nicoco

    yes? I believe in most private groups, you are actually presence sub=both with all people in the group. At least that's true for me.

  315. nicoco

    oh, there might be a "nick" attribute in the affiliation list, but that's rarely used AFAIK, notably because not all clients actually play nice with the MUC renaming you. I recently had an issue with a quicksy ios user because I set a reserved nickname for them, and it broke quicksy ios: https://github.com/monal-im/Monal/issues/1397

  316. lovetox

    there can be no nick if the user is not joined

  317. nicoco

    reserved nicknames are a thing

  318. lovetox

    what i meant to say is, there are situations where there will be no nick

  319. nicoco

    oh right

  320. nicoco

    yes, fallback to the local part sounds reasonable here, right?

  321. nicoco

    oh I see your concern I think

  322. nicoco

    we actually never use the nickname if the participant is onlineโ€ฆ

  323. lovetox

    my concern was that currently we use roster nick or localpart

  324. nicoco

    but we fall back to the issue of having to calc on all joins/leaves, don't we? this was the major concern

  325. lovetox

    question is if it should be roster -> resource -> localpart

  326. nicoco

    but we fall back to the issue of having to calc on all joins/leaves, don't we? this was the major concern on the previous iteration

  327. nicoco

    but we fall back to the issue of having to calc on all joins/leaves, don't we? this was the major concern on the previous iteration

  328. lovetox

    no, because we calc only on join

  329. lovetox

    i would not change that

  330. lovetox

    but yeah ..

  331. nicoco

    ok, we have a slight inconsistency for the group name depending on who's online when we join then, but we already have an inconsistency depending on who's in our roster anyway

  332. lovetox

    no actually it would be a problem

  333. lovetox

    on each join the name would potentially change

    ๐Ÿ‘ˆ 1
  334. lovetox

    depending on whos online currently

  335. lovetox

    i dont like that

  336. nicoco

    technically we could fetch the pep nickname of members not in our roster too but this feels unnecessary, right?

  337. lovetox

    keep it simple and lets role with what you have now

  338. lovetox

    we can always extend this logic if its necessary

  339. nicoco

    similarly to the previous discussion, I believe this is a 95% solution

  340. nicoco

    you are usually "friend" with people in your private groups in my experience

  341. lovetox

    yes, lets leave it at that

  342. lovetox

    and we will also make it easier to rename a chat

  343. lovetox

    maybe with context menu

  344. lovetox

    then people that think it bothers them, can give the chat a descriptive name anyway

  345. nicoco

    sounds good to me

  346. lovetox

    all this is a for a sensible fallback

  347. lovetox

    the optimal case of course is people naming their chats

  348. lovetox

    the only time i not name them are, quick adhoc chats that have no purpose a few days later

  349. nicoco

    we don't control what other clients do, and I think there are groupchat creation flows in Conversations that don't offer to set a name for the chat on creation.

  350. nicoco

    In my experience, non-tech users tend to create a lot of groups, and not name them.

  351. lovetox

    yeah, the point is they can if they are not happy

  352. lovetox

    like, we dont offer a feature here that makes naming chats obsolete

  353. lovetox

    we just improve the default

  354. nicoco

    and we're in line with what other modern clients do, too

  355. lovetox

    one other thing i noticed

  356. lovetox

    you just check if its members only

  357. lovetox

    i wonder if thats a problem

  358. lovetox

    like it needs to be disco_info.muc_is_members_only and disco_info.muc_is_nonanonymous

  359. lovetox

    if its anonymous we will not receive affiliations

  360. nicoco

    I think you're right

  361. nicoco

    It's rare to not have both set, but it can happen

  362. lovetox

    nonanonymous is a preconditions for the name calculation even working

  363. lovetox

    members_only is when we want to use it

  364. nicoco

    that said, if `muc_data.affiliations` is empty we fallback to the local part, but we might as well not send the queries

  365. nicoco

    I'm looking at the XEP and I wonder if muc#roomconfig_getmemberlist isn't what we actually need to check?

  366. lovetox

    thats some custom thing or?

  367. lovetox

    i dont think thats official

  368. nicoco

    xep-0045 yes https://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner

  369. lovetox

    ah yeah but its useless

  370. lovetox

    since omemo came every server needs to return that for chats, otherwise omemo is broken

  371. lovetox

    yes it can theoretically configured to not do this

  372. lovetox

    but this should be a rare enough case, that we can live with IQs returning an error

  373. lovetox

    its a few lines to add this check though ..

  374. nicoco

    a bit more I think?

  375. lovetox

    i think its good enough that we dont send the affil requests when its anonmous

  376. lovetox

    then affil will be empty and we return local

  377. nicoco

    roomconfig_getmemberlist is a list-multi, so we need a bit more than a few lines I think, because there is no property related to that, and need to check against our own affiliation/role too. not that many lines, probably.

  378. nicoco

    but you're saying we don't need it, so let's just turn `if disco_info.muc_is_members_only` to `... and disco_info.muc_is_nonanonymous` in the two occurences of this check?

  379. nicoco

    or do you want an helper for that, to keep it DRYer?

  380. lovetox

    i think its enough if we add the condition to the affil request

  381. nicoco

    damn I already pushed

  382. lovetox

    because as you said if the affils are empty, we anyway fall back to local

  383. lovetox

    yeah .. no hard opinion

  384. lovetox

    then check in both is also ok

  385. lovetox

    leave it

    ๐Ÿ‘ 1
  386. nicoco

    maybe we can have our own affiliation in there?

  387. nicoco

    maybe not

  388. lovetox

    i discovered another problem now that we changed the approach of storing the name in the database

  389. lovetox

    there are 2 more events that change the name

  390. lovetox

    1. when a bookmark is changed 2. when name in disco is changed

  391. lovetox

    both modules would now need to trigger the calc code

  392. lovetox

    and store then result in the database

  393. nicoco

    damn. I will look into this then, but not tonight because my eyes do not want to stay open :)

  394. lovetox

    yes i try to write down my thoughts how this should be handled in the mr