Skip to content

Commit

Permalink
fix(permission): unable to send messages in DM
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoAlgorithm committed Sep 30, 2023
1 parent 1ff5077 commit 25772aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Swiftcord/Views/Message/MessagesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ struct MessagesView: View {
MessageInfoBarView(isShown: $viewModel.showingInfoBar, state: $viewModel.infoBarData)

let hasSendPermission: Bool = {
guard let guildID = ctx.guild?.id, let member = ctx.member else {
return false
}
guard let guildID = ctx.guild?.id else { return false }
guard !guildID.isDM else { return true }
guard let member = ctx.member else { return false }
return channel.computedPermissions(
guildID: guildID, member: member, basePerms: ctx.basePermissions
)
Expand Down

0 comments on commit 25772aa

Please sign in to comment.