// postCreateActivity creates and posts create activity (announces anchor credential to followers).
postCreateActivity creates and posts create activity (announces anchor credential to followers).
// postCreateActivity creates and posts create activity ( announces anchor credential to followers ) .
func (c *Writer) postCreateActivity(anchorEvent *vocab.AnchorEventType, hl string) error { 
	systemFollowers, err := url.Parse(c.apServiceIRI.String() + resthandler.FollowersPath)
	if err != nil {
		return fmt.Errorf("failed to create new object with document: %w", err)
	}
	hlURL, err := url.Parse(hl)
	if err != nil {
		return fmt.Errorf("parse hashlink: %w", err)
	}
	anchorEvent = vocab.NewAnchorEvent(
		vocab.WithURL(hlURL),
		vocab.WithAttributedTo(anchorEvent.AttributedTo().URL()),
		vocab.WithIndex(anchorEvent.Index()),
		vocab.WithPublishedTime(anchorEvent.Published()),
		vocab.WithParent(anchorEvent.Parent()...),
		vocab.WithAttachment(anchorEvent.Attachment()...),
	)
	now := time.Now()
	create := vocab.NewCreateActivity(
		vocab.NewObjectProperty(vocab.WithAnchorEvent(anchorEvent)),
		vocab.WithTo(systemFollowers, vocab.PublicIRI),
		vocab.WithPublishedTime(&now),
	)
	postID, err := c.Outbox.Post(create)
	if err != nil {
		return err
	}
	logger.Debugf("Successfully posted 'Create' activity to my followers [%s]", postID)
	return nil
}
func ( c * Writer ) postCreateActivity ( anchorEvent * vocab . AnchorEventType , hl string ) error { systemFollowers , err := url . Parse ( c . apServiceIRI . String ( ) + resthandler . FollowersPath ) if err != nil { return fmt . Errorf ( " " , err ) } hlURL , err := url . Parse ( hl ) if err != nil { return fmt . Errorf ( " " , err ) } anchorEvent = vocab . NewAnchorEvent ( vocab . WithURL ( hlURL ) , vocab . WithAttributedTo ( anchorEvent . AttributedTo ( ) . URL ( ) ) , vocab . WithIndex ( anchorEvent . Index ( ) ) , vocab . WithPublishedTime ( anchorEvent . Published ( ) ) , vocab . WithParent ( anchorEvent . Parent ( ) ... ) , vocab . WithAttachment ( anchorEvent . Attachment ( ) ... ) , ) now := time . Now ( ) create := vocab . NewCreateActivity ( vocab . NewObjectProperty ( vocab . WithAnchorEvent ( anchorEvent ) ) , vocab . WithTo ( systemFollowers , vocab . PublicIRI ) , vocab . WithPublishedTime ( & now ) , ) postID , err := c . Outbox . Post ( create ) if err != nil { return err } logger . Debugf ( " " , postID ) return nil }
postCreateActivity creates and posts create activity (announces anchor credential to followers).
postCreateActivity creates and posts create activity ( announces anchor credential to followers ) .
//nolint: interfacer // Create a new Info that includes the hashlink of where this activity is stored, // so that a server that's processing this event may resolve the Info from the hashlink.