Exemple #1
0
func (SubsObjMapper) Create(sub *types.Subscription) error {
	sub.InitTimes()

	_, err := adaptr.TopicShare([]types.Subscription{*sub})
	return err
}
Exemple #2
0
// CreateP2P creates a P2P topic by generating two user's subsciptions to each other.
func (TopicsObjMapper) CreateP2P(initiator, invited *types.Subscription) error {
	initiator.InitTimes()
	invited.InitTimes()

	return adaptr.TopicCreateP2P(initiator, invited)
}