Versions in this module Expand all Collapse all v1 v1.13.0 Jun 2, 2026 Changes in this version + const ChatIDSize + var ErrChatExists = errors.New("chat already exists") + var ErrChatNotFound = errors.New("chat not found") + func MustDeriveDmChatID(a, b *commonpb.UserId) *commonpb.ChatId + type Chat struct + ID *commonpb.ChatId + LastActivity time.Time + LastMessageID *messagingpb.MessageId + Members []*commonpb.UserId + Type chatpb.Metadata_ChatType + func (c *Chat) Clone() *Chat + func (c *Chat) HasMember(userID *commonpb.UserId) bool + func (c *Chat) ToProto() *chatpb.Metadata + type DmFeedCursor struct + ChatID *commonpb.ChatId + LastActivity time.Time + type MessageRef struct + ChatID *commonpb.ChatId + MessageID *messagingpb.MessageId + type MessagingReader interface + LastMessages func(ctx context.Context, refs []MessageRef) (map[string]*messagingpb.Message, error) + Pointers func(ctx context.Context, chatIDs []*commonpb.ChatId) (map[string][]*messagingpb.Pointer, error) + type Server struct + func NewServer(log *zap.Logger, authz auth.Authorizer, chats Store, messaging MessagingReader) *Server + func (s *Server) GetChat(ctx context.Context, req *chatpb.GetChatRequest) (*chatpb.GetChatResponse, error) + func (s *Server) GetDmChatFeed(ctx context.Context, req *chatpb.GetDmChatFeedRequest) (*chatpb.GetDmChatFeedResponse, error) + type Store interface + AdvanceLastMessage func(ctx context.Context, chatID *commonpb.ChatId, messageID *messagingpb.MessageId, ...) (bool, error) + GetChatByID func(ctx context.Context, chatID *commonpb.ChatId) (*Chat, error) + GetDmFeedPage func(ctx context.Context, userID *commonpb.UserId, snapshot time.Time, ...) ([]*Chat, error) + GetMembers func(ctx context.Context, chatID *commonpb.ChatId) ([]*commonpb.UserId, error) + IsMember func(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, error) + PutChat func(ctx context.Context, chat *Chat) error