aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/MessagesServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index 53f2407c..85dadd77 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -1175,4 +1175,10 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
}
return Optional.empty();
}
+ @Transactional
+ @Override
+ public void setFriendsOnly(Integer mid, Boolean friendsOnly) {
+ int privacy = friendsOnly ? -1 : 1;
+ jdbcTemplate.update("UPDATE messages SET privacy=? WHERE message_id=?", privacy, mid);
+ }
}