35a0b2b715
- 27 base tools: channels, messaging, users, reactions, files, DMs - Team management: invite/remove users, get stats, list members - Slash commands: execute /remind, /poll, etc. - Webhook management: incoming and outgoing webhooks - System tools: server config, logs, bulk status updates - Channel admin: create, invite, leave, delete channels - Read-only mode for safe exploration - Dual token support (bot + PAT) for enhanced security - Apache 2.0 licensed
18 lines
360 B
Go
18 lines
360 B
Go
package messaging
|
|
|
|
import "github.com/mattermost/mattermost-server/v6/model"
|
|
|
|
func SlimPost(p *model.Post) map[string]interface{} {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return map[string]interface{}{
|
|
"id": p.Id,
|
|
"channel_id": p.ChannelId,
|
|
"user_id": p.UserId,
|
|
"message": p.Message,
|
|
"create_at": p.CreateAt,
|
|
"update_at": p.UpdateAt,
|
|
}
|
|
}
|