mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Fix oopsie
This commit is contained in:
parent
2934d726f2
commit
e1f05aa2a5
1 changed files with 3 additions and 1 deletions
|
@ -789,8 +789,10 @@ public class ResponseHelper {
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
try (Session s = DatabaseSessionFactory.createSession()) {
|
try (Session s = DatabaseSessionFactory.createSession()) {
|
||||||
if (user.getSubscribed().contains(channelId)) {
|
if (user.getSubscribed().contains(channelId)) {
|
||||||
|
Set<String> subscribed = user.getSubscribed();
|
||||||
|
subscribed.removeIf(sub -> sub.equals(channelId));
|
||||||
|
user.setSubscribed(subscribed);
|
||||||
|
|
||||||
user.getSubscribed().removeIf(sub -> sub.equals(channelId));
|
|
||||||
s.update(user);
|
s.update(user);
|
||||||
s.getTransaction().begin();
|
s.getTransaction().begin();
|
||||||
s.getTransaction().commit();
|
s.getTransaction().commit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue