Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
following.go1.21 kB
package following import ( "context" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fctx" "github.com/Southclaws/opt" "github.com/Southclaws/storyden/app/resources/account" "github.com/Southclaws/storyden/app/resources/account/notification" "github.com/Southclaws/storyden/app/resources/profile/follow_writer" "github.com/Southclaws/storyden/app/services/notification/notify" ) type FollowManager struct { followWriter *follow_writer.Writer notifier *notify.Notifier } func New(followWriter *follow_writer.Writer, notifier *notify.Notifier) *FollowManager { return &FollowManager{followWriter: followWriter, notifier: notifier} } func (f *FollowManager) Follow(ctx context.Context, follower, following account.AccountID) error { err := f.followWriter.Follow(ctx, follower, following) if err != nil { return fault.Wrap(err, fctx.With(ctx)) } f.notifier.Send(ctx, following, opt.New(follower), notification.EventFollow, nil) return nil } func (f *FollowManager) Unfollow(ctx context.Context, follower, following account.AccountID) error { err := f.followWriter.Unfollow(ctx, follower, following) if err != nil { return fault.Wrap(err, fctx.With(ctx)) } return nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server