mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(gateway): drop dead clauses in dm partner visibility (#2665)
This commit is contained in:
@@ -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) ->
|
||||||
|
|||||||
Reference in New Issue
Block a user