Merged
Conversation
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Instead of c&p'ing the same code again and again, put everything in a struct and loop over it. This also fixes `vcard` not being in included in `all`. Fixes: f934c5b ("Add vCard support") Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Instead of manually typing the format-string, one can now simply use `iso8601`. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
`end_date` only gets free'd if `chatwin_db_history()` is called, which is not always the case. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
sjaeckel
commented
Apr 2, 2025
811c11d to
c4b2aca
Compare
> The returned data is valid until changes to the hash release those keys. As of the doc of `g_hash_table_get_keys()` [0]. > The returned data is valid until hash_table is modified. As of the doc of `g_hash_table_get_values()` [1]. Use this property and create the lists when modifying the hashtable. The `keys` list is most of the time used sorted, so sort it immediately. In the cases where it was not used sorted, it does not matter. This started off by looking into whether this can be improved. `g_hash_table_foreach()` is discouraged to be used and proposes to use a `GHashTableIter`. Since our lists are not modified very often it does not really make sense, so I decided to keep using lists, but allocating those lists statically instead of per invocation. Instead of using a list, we could maybe use the `GArray` version, but I am not sure whether it wouldn't be even better to replace the `GHashTable` all along to store the `windows` instead. [0] https://docs.gtk.org/glib/type_func.HashTable.get_keys.html [1] https://docs.gtk.org/glib/type_func.HashTable.get_values.html Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
We must only return early in cases where we received a roster push with 1. a `from` attribute 2. that `from` is not our bare JID The server sends roster pushes without `from` attribute and we must accept them. Fixes #2035 Fixes: bac2460 ("Introduce `equals_our_barejid()`") Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
c4b2aca to
ed44d7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check commit messages for details.