Add a common function for webhooks to convert multipart strings to dict.
This facilitates loading a multipart/form-data fixture as a file string,
and converting it.
This will allow testing integrations that use multipart/form-data,
and generating their example screenshots using a script.
Note that this only supports text fields, accommodation for binary files
is not included at the moment.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes#32486.
We would show the leave group button if user was a member either
directly or via a subgroup. But that button is only applicable for
adding/removing a direct membership, so we will show the join group
button if the user belongs to a group via subgroup and not by direct
membership.
When the current user was part of a group through both subgroup and a
direct membership, leaving the group would only remove the direct
membership. But since the user is part of the group through subgroup,
`is_user_in_group` will be true inside `handle_member_edit_event` which
should only be triggered when a user is on another group edit panel and
they join a group via the left panel plus button. In that case, the edit
panel of the newly joined group should open.
Instead of handling this on event, where we could not tell who triggered
the event, the current user or someone else, we now handle this in the
success callback of `add_or_remove_from_group`.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20panel.20error/near/1987891
We already allow a user to join the group if they can add members
to that group in the API, but it was not allowed in the UI. This
commit fixes the UI.
`Filter.public_terms` will return the same result even if the
narrow is combined feed. Since we are no longer passing
empty narrow parameters for combined feed, this condition is
not required.
When we will no longer clear cached data on moving messages in
later commits, we have to clear cached data for the new filter when
changing narrow to avoid the message list from being populated
from it since the cached msg data is not updated as per the moved
topic and needs to be updated.
This change introduces a new function, fetch_presence_user_setting,
to retrieve presence data of users. The function fetches data for a very
long duration by setting the `history_limit_days` parameter to 365*1000.
Fixes#31039.
If a participant is unsubscribed, we still want to show them in
the participants list, since users might expect them to be there
anyways. We also already calculate the count including the
unsubscribed participants, so this fixes a bug where the count
could be higher than the list of people.
We already have fetched all the groups that the user is
member of, so we can just check if can_invite_users_group
is included in that list of groups like we do for similar
fields like can_create_public_streams, etc.
This helps us in saving a DB query.
Fixes#32408.
Right now, the number of queries has remained the same, but when we add
more settings in the future, we won't be increasing the number of
queries when iterating over stream permission group settings.