mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
The server module named github.com/hanzoai/team/server/v8 — a path that resolves to the retired workspace's repository, not this one — while server/public still published github.com/mattermost/mattermost/server/public. Both are github.com/hanzoteam/server/... now, which is where this code actually lives. That second half is what made the binary unbootable. Upstream's public path stayed claimed by upstream, mattermost-plugin-ai imported it, and the build linked public/model twice; public/plugin's gob.Register then ran twice under one name and panicked at init, before main. Reverting the rename traded the brand for a working binary. Rebranding the plugin alongside it needs no such trade: the agents fork is github.com/hanzoteam/agents/v2 against our public module, so no module named mattermost/mattermost is in the graph at all. Measured: `go list -deps ./cmd/mattermost` names exactly one public/model, and it is ours.
39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved.
|
|
// See License for license information.
|
|
|
|
package poster
|
|
|
|
import (
|
|
"github.com/hanzoteam/server/server/public/model"
|
|
)
|
|
|
|
// Poster defines an entity that can post DMs and Ephemerals and update and delete those posts
|
|
type Poster interface {
|
|
DMer
|
|
|
|
// DMWithAttachments posts a Direct Message that contains Message Attachments.
|
|
// Often used to include post actions.
|
|
DMWithAttachments(mattermostUserID string, attachments ...*model.MessageAttachment) (string, error)
|
|
|
|
// Ephemeral sends an ephemeral message to a user
|
|
Ephemeral(mattermostUserID, channelID, format string, args ...any)
|
|
|
|
// UpdatePostByID updates the post with postID with the formatted message
|
|
UpdatePostByID(postID, format string, args ...any) error
|
|
|
|
// DeletePost deletes a single post
|
|
DeletePost(postID string) error
|
|
|
|
// DMUpdatePost substitute one post with another
|
|
UpdatePost(post *model.Post) error
|
|
|
|
// UpdatePosterID updates the Hanzo Team User ID of the poster
|
|
UpdatePosterID(id string)
|
|
}
|
|
|
|
// DMer defines an entity that can send Direct Messages
|
|
type DMer interface {
|
|
// DM posts a simple Direct Message to the specified user
|
|
DM(mattermostUserID, format string, args ...any) (string, error)
|
|
}
|