Skip to content

Commit

Permalink
Merge pull request #23 from DreamExposure/hotfix/permissions
Browse files Browse the repository at this point in the history
Hotfix -  incorrect permission override on ticket create
  • Loading branch information
NovaFox161 authored Aug 23, 2022
2 parents a010f3c + 91c9555 commit c5502c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dependencies {
}

group = "org.dreamexposure"
version = "2.0.0"
version = "2.0.0.hf1"
description = "TicketBird"
java.sourceCompatibility = JavaVersion.VERSION_17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class DefaultPermissionService(
override fun getTicketChannelOverwrites(guildId: Snowflake, creator: Snowflake, staff: List<Snowflake>): List<PermissionOverwrite> {
val overwrites = mutableListOf<PermissionOverwrite>()

overwrites += PermissionOverwrite.forMember(guildId, getTicketGrantOverrides(), PermissionSet.none())
overwrites += PermissionOverwrite.forMember(creator, getTicketGrantOverrides(), PermissionSet.none())
overwrites += PermissionOverwrite.forRole(guildId, PermissionSet.none(), PermissionSet.all())
overwrites += staff.map { PermissionOverwrite.forMember(it, getTicketGrantOverrides(), PermissionSet.none()) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ActivityMonitor(
.collectList().awaitSingle()
val respondedCategoryChannels = guild.getChannelById(settings.respondedCategory!!)
.ofType(Category::class.java)
.onErrorResume { Mono.empty() }
.flatMapMany { it.channels.ofType(TextChannel::class.java) }
.collectList().awaitSingle()

Expand Down

0 comments on commit c5502c8

Please sign in to comment.