feat: release v0.2.0 profiles, chat, freeze, and bots
Ship the product pass on the v0.1.3 schema with additive migrations, a replica migration lock, and bot accounts kept out of people lists.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/redis/go-redis/v9"
|
||||
@@ -31,6 +33,11 @@ type Server struct {
|
||||
|
||||
func NewServer(cfg *config.Config, st *store.Store, rdb *redis.Client, stg storage.Storage) *Server {
|
||||
hub := NewHub(rdb)
|
||||
hub.SetSeen(func(userID int64) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||
defer cancel()
|
||||
_ = st.TouchLastSeen(ctx, userID)
|
||||
})
|
||||
notifier := service.NewNotifier(st, hub)
|
||||
trustedProxyConfig = cfg
|
||||
return &Server{
|
||||
|
||||
Reference in New Issue
Block a user