From aef476e384a82825cfcd62ef9f04d65e71ae31e0 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 4 May 2022 00:37:41 +0200 Subject: [PATCH] bugfix --- pom.xml | 2 +- src/main/java/de/srsoftware/widerhall/data/ListMember.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index e67519e..4378796 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.example Widerhall - 0.2.59 + 0.2.60 diff --git a/src/main/java/de/srsoftware/widerhall/data/ListMember.java b/src/main/java/de/srsoftware/widerhall/data/ListMember.java index 92003f3..7d5f54e 100644 --- a/src/main/java/de/srsoftware/widerhall/data/ListMember.java +++ b/src/main/java/de/srsoftware/widerhall/data/ListMember.java @@ -69,9 +69,9 @@ public class ListMember { } try { if (member == null) { - ListMember.create(list, moderator, ListMember.STATE_MODERATOR); + ListMember.create(list, moderator, STATE_MODERATOR); } else { - member.setState((member.state | STATE_MODERATOR) ^ STATE_AWAITING_CONFIRMATION); + member.setState(Util.unset(member.state|STATE_MODERATOR,STATE_AWAITING_CONFIRMATION)); } } catch (SQLException e) { LOG.warn("Failed to make {} a moderator of {}",moderator.email(),list.email(),e); @@ -212,7 +212,7 @@ public class ListMember { if (member == null) { ListMember.create(list, moderator, ListMember.STATE_SUBSCRIBER); } else { - member.setState(ListMember.STATE_SUBSCRIBER); + member.setState(Util.unset(member.state,STATE_MODERATOR)); } } catch (SQLException e) { LOG.warn("Failed to make {} a subscriber of {}",moderator.email(),list.email(),e);