From 43cb264956846092dac15c3f83cd11bcbf524396 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 30 Sep 2023 21:31:52 +0800 Subject: [PATCH 1/2] update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12834b2a..51ac4383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -149,6 +149,16 @@ All notable changes to paopao-ce are documented in this file. ``` - add message filter support for message page. - add read all unread message and display unread message count support for message page. +- add support follow user embed to index trends enable navigation user tweets by slide bar. + mirgration database first(sql ddl file in `scripts/migration/**/*_user_relation.up.sql`): + ```sql + CREATE VIEW p_user_relation AS + SELECT user_id, friend_id he_uid, 5 AS style + FROM p_contact WHERE status=2 AND is_del=0 + UNION + SELECT user_id, follow_id he_uid, 10 AS style + FROM p_following WHERE is_del=0; + ``` ## 0.4.2 ### Fixed From 47c963da2f8660748019aa5112f55420cff694ad Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sun, 1 Oct 2023 01:16:14 +0800 Subject: [PATCH 2/2] optimize online user metric cache logic --- internal/servants/chain/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/servants/chain/metrics.go b/internal/servants/chain/metrics.go index e159829e..a6d550c6 100644 --- a/internal/servants/chain/metrics.go +++ b/internal/servants/chain/metrics.go @@ -31,6 +31,6 @@ func (m *OnlineUserMetric) Name() string { func (m *OnlineUserMetric) Action() (err error) { // 暂时仅做标记,不存储其他相关信息 - m.ac.Set(conf.KeyOnlineUser.Get(m.uid), []byte{}, m.expire) + m.ac.SetNx(conf.KeyOnlineUser.Get(m.uid), []byte{}, m.expire) return }