Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии
This commit is contained in:
@@ -42,3 +42,9 @@ func NewMessage(id, chatID, senderID uuid.UUID, text string) (Message, error) {
|
||||
CreatedAt: ident.TimeOf(id),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// SameContent reports whether two messages say the same thing, whatever their
|
||||
// ids and times.
|
||||
func (m Message) SameContent(other Message) bool {
|
||||
return m.Text == other.Text
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user