Skip to content

Commit

Permalink
🔧 #151
Browse files Browse the repository at this point in the history
  • Loading branch information
adlered committed Oct 12, 2024
1 parent b7a1d3b commit 562ace8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
15 changes: 0 additions & 15 deletions src/main/java/org/b3log/symphony/processor/ChatroomProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ public void addChatRoomMsg(final RequestContext context) {
} else if (content.startsWith("[weather]") && content.endsWith("[/weather]")){
String weatherString = content.replaceAll("^\\[weather\\]", "").replaceAll("\\[/weather\\]$", "");

JSONObject weatherJSON = new JSONObject();
// 加活跃
incLiveness(userId);
// 聊天室内容保存到数据库
Expand All @@ -928,20 +927,6 @@ public void addChatRoomMsg(final RequestContext context) {

context.renderJSON(StatusCodes.SUCC);

try {
final List<JSONObject> atUsers = atUsers(msg.optString(Common.CONTENT), userName);
if (Objects.nonNull(atUsers) && !atUsers.isEmpty()) {
for (JSONObject user : atUsers) {
final JSONObject notification = new JSONObject();
notification.put(Notification.NOTIFICATION_USER_ID, user.optString("oId"));
notification.put(Notification.NOTIFICATION_DATA_ID, msg.optString("oId"));
notificationMgmtService.addChatRoomAtNotification(notification);
}
}
} catch (Exception e) {
LOGGER.log(Level.ERROR, "notify user failed", e);
}

try {
final JSONObject user = userQueryService.getUser(userId);
user.put(UserExt.USER_LATEST_CMT_TIME, System.currentTimeMillis());
Expand Down
Loading

0 comments on commit 562ace8

Please sign in to comment.