Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
1.7 KiB
Go
56 lines
1.7 KiB
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package app
|
|
|
|
import (
|
|
"github.com/mattermost/mattermost/server/public/model"
|
|
"github.com/mattermost/mattermost/server/v8/channels/app/platform"
|
|
)
|
|
|
|
func (a *App) TotalWebsocketConnections() int {
|
|
return a.Srv().Platform().TotalWebsocketConnections()
|
|
}
|
|
|
|
func (a *App) GetHubForUserId(userID string) *platform.Hub {
|
|
return a.Srv().Platform().GetHubForUserId(userID)
|
|
}
|
|
|
|
func (a *App) Publish(message *model.WebSocketEvent) {
|
|
a.Srv().Platform().Publish(message)
|
|
}
|
|
|
|
func (ch *Channels) Publish(message *model.WebSocketEvent) {
|
|
ch.srv.Platform().Publish(message)
|
|
}
|
|
|
|
func (a *App) invalidateCacheForChannelMembers(channelID string) {
|
|
a.Srv().Platform().InvalidateCacheForChannelMembers(channelID)
|
|
}
|
|
|
|
func (a *App) invalidateCacheForChannelMembersNotifyProps(channelID string) {
|
|
a.Srv().Platform().InvalidateCacheForChannelMembersNotifyProps(channelID)
|
|
}
|
|
|
|
func (a *App) invalidateCacheForChannelPosts(channelID string) {
|
|
a.Srv().Platform().InvalidateCacheForChannelPosts(channelID)
|
|
}
|
|
|
|
func (a *App) InvalidateCacheForUser(userID string) {
|
|
a.Srv().Platform().InvalidateCacheForUser(userID)
|
|
}
|
|
|
|
func (a *App) invalidateCacheForUserTeams(userID string) {
|
|
a.Srv().Platform().InvalidateCacheForUserTeams(userID)
|
|
}
|
|
|
|
// UpdateWebConnUserActivity sets the LastUserActivityAt of the hub for the given session.
|
|
func (a *App) UpdateWebConnUserActivity(session model.Session, activityAt int64) {
|
|
a.Srv().Platform().UpdateWebConnUserActivity(session, activityAt)
|
|
}
|
|
|
|
// SessionIsRegistered determines if a specific session has been registered
|
|
func (a *App) SessionIsRegistered(session model.Session) bool {
|
|
return a.Srv().Platform().SessionIsRegistered(session)
|
|
}
|