fix(gateway): drop dead clauses in dm partner visibility (#2665)

This commit is contained in:
Hampus
2026-09-11 13:00:23 +02:00
committed by GitHub
parent 3a862f1484
commit 320949a79d
+6 -10
View File
@@ -62,17 +62,15 @@ visibility_inputs(State) ->
maps:get(virtual_channel_access, State, #{}) maps:get(virtual_channel_access, State, #{})
}. }.
-spec role_inputs(term()) -> term(). -spec role_inputs(map()) -> [{term(), term()}].
role_inputs(Roles) when is_map(Roles) -> role_inputs(Roles) ->
lists:sort([ lists:sort([
{Id, maps:get(<<"permissions">>, Role, undefined)} {Id, maps:get(<<"permissions">>, Role, undefined)}
|| {Id, Role} <- maps:to_list(Roles), is_map(Role) || {Id, Role} <- maps:to_list(Roles), is_map(Role)
]); ]).
role_inputs(Roles) ->
Roles.
-spec channel_inputs(term()) -> term(). -spec channel_inputs(map()) -> [{term(), term(), term(), term()}].
channel_inputs(Channels) when is_map(Channels) -> channel_inputs(Channels) ->
lists:sort([ lists:sort([
{ {
Id, Id,
@@ -81,9 +79,7 @@ channel_inputs(Channels) when is_map(Channels) ->
maps:get(<<"permission_overwrites">>, Channel, []) maps:get(<<"permission_overwrites">>, Channel, [])
} }
|| {Id, Channel} <- maps:to_list(Channels), is_map(Channel) || {Id, Channel} <- maps:to_list(Channels), is_map(Channel)
]); ]).
channel_inputs(Channels) ->
Channels.
-spec update(session_id(), [term()], guild_state()) -> guild_state(). -spec update(session_id(), [term()], guild_state()) -> guild_state().
update(SessionId, PartnerIds, State) -> update(SessionId, PartnerIds, State) ->