diff --git a/greataped/components/api/handlers/factory.go b/greataped/components/api/handlers/factory.go index e89dfc3..88cad5c 100644 --- a/greataped/components/api/handlers/factory.go +++ b/greataped/components/api/handlers/factory.go @@ -21,6 +21,7 @@ func (factory *httpHandlerFactory) Handlers() []IHttpHandler { GetFollowingHandler(), // │ G . /u/:username/following PostToOutboxHandler(), // │ P . /u/:username/outbox GetOutboxHandler(), // │ G . /u/:username/outbox + PostToInboxHandler(), // │ P . /u/:username/inbox } } diff --git a/greataped/components/api/handlers/post_to_inbox_handler.go b/greataped/components/api/handlers/post_to_inbox_handler.go new file mode 100644 index 0000000..6b3045c --- /dev/null +++ b/greataped/components/api/handlers/post_to_inbox_handler.go @@ -0,0 +1,45 @@ +package handlers + +import ( + "net/http" + + . "github.com/xeronith/diamante/contracts/network/http" + pipeline "github.com/xeronith/diamante/network/http" + . "rail.town/infrastructure/components/api/protobuf" + . "rail.town/infrastructure/components/contracts" +) + +type postToInboxHandler struct { +} + +func PostToInboxHandler() IHttpHandler { + return &postToInboxHandler{} +} + +func (handler *postToInboxHandler) Method() string { + return http.MethodPost +} + +func (handler *postToInboxHandler) Path() string { + return "/u/:username/inbox" +} + +func (handler *postToInboxHandler) HandlerFunc() HttpHandlerFunc { + return func(x IServerDispatcher) error { + request := &PostToInboxRequest{} + result := &PostToInboxResult{} + + onRequestUnmarshalled := func(request *PostToInboxRequest) { + request.Username = x.Param("username") + } + + return pipeline.Handle(x, + "post_to_inbox", + POST_TO_INBOX_REQUEST, + POST_TO_INBOX_RESULT, + request, result, + onRequestUnmarshalled, + false, + ) + } +} diff --git a/greataped/components/api/operations/factory.go b/greataped/components/api/operations/factory.go index 2863705..4b3beaa 100644 --- a/greataped/components/api/operations/factory.go +++ b/greataped/components/api/operations/factory.go @@ -22,6 +22,7 @@ func (factory *operationFactory) Operations() []IOperation { GetFollowingOperation(), PostToOutboxOperation(), GetOutboxOperation(), + PostToInboxOperation(), } } diff --git a/greataped/components/api/operations/post_to_inbox_operation.go b/greataped/components/api/operations/post_to_inbox_operation.go new file mode 100644 index 0000000..b054ff7 --- /dev/null +++ b/greataped/components/api/operations/post_to_inbox_operation.go @@ -0,0 +1,51 @@ +package operations + +import ( + . "github.com/xeronith/diamante/contracts/operation" + . "github.com/xeronith/diamante/contracts/service" + . "github.com/xeronith/diamante/contracts/system" + . "github.com/xeronith/diamante/operation" + . "rail.town/infrastructure/components/api/protobuf" + . "rail.town/infrastructure/components/api/services" + . "rail.town/infrastructure/components/contracts" +) + +type postToInboxOperation struct { + Operation + + run func(IContext, *PostToInboxRequest) (*PostToInboxResult, error) +} + +func PostToInboxOperation() IOperation { + return &postToInboxOperation{ + run: PostToInboxService, + } +} + +func (operation *postToInboxOperation) Id() (ID, ID) { + return POST_TO_INBOX_REQUEST, POST_TO_INBOX_RESULT +} + +func (operation *postToInboxOperation) InputContainer() Pointer { + return new(PostToInboxRequest) +} + +func (operation *postToInboxOperation) OutputContainer() Pointer { + return new(PostToInboxResult) +} + +func (operation *postToInboxOperation) Execute(context IContext, payload Pointer) (Pointer, error) { + return operation.run(context, payload.(*PostToInboxRequest)) +} + +/* +func (operation *postToInboxOperation) ExecutionTimeLimits() (Duration, Duration, Duration) { + var ( + TIME_LIMIT_WARNING Duration = 20_000_000 + TIME_LIMIT_ALERT Duration = 35_000_000 + TIME_LIMIT_CRITICAL Duration = 50_000_000 + ) + + return TIME_LIMIT_WARNING, TIME_LIMIT_ALERT, TIME_LIMIT_CRITICAL +} +*/ diff --git a/greataped/components/api/protobuf/spis.pb.go b/greataped/components/api/protobuf/spis.pb.go index e5467f3..d27e6fd 100644 --- a/greataped/components/api/protobuf/spis.pb.go +++ b/greataped/components/api/protobuf/spis.pb.go @@ -1983,6 +1983,93 @@ func (x *GetOutboxResult) GetFirst() string { return "" } +// API: PostToInbox +// ----------------------------------------------------------- +type PostToInboxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +} + +func (x *PostToInboxRequest) Reset() { + *x = PostToInboxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostToInboxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostToInboxRequest) ProtoMessage() {} + +func (x *PostToInboxRequest) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostToInboxRequest.ProtoReflect.Descriptor instead. +func (*PostToInboxRequest) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{32} +} + +func (x *PostToInboxRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type PostToInboxResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PostToInboxResult) Reset() { + *x = PostToInboxResult{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostToInboxResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostToInboxResult) ProtoMessage() {} + +func (x *PostToInboxResult) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostToInboxResult.ProtoReflect.Descriptor instead. +func (*PostToInboxResult) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{33} +} + var File_spis_proto protoreflect.FileDescriptor var file_spis_proto_rawDesc = []byte{ @@ -2178,8 +2265,12 @@ var file_spis_proto_rawDesc = []byte{ 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x12, 0x50, 0x6f, + 0x73, 0x74, 0x54, 0x6f, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x13, 0x0a, 0x11, + 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2194,7 +2285,7 @@ func file_spis_proto_rawDescGZIP() []byte { return file_spis_proto_rawDescData } -var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_spis_proto_goTypes = []interface{}{ (*SystemCallRequest)(nil), // 0: protobuf.SystemCallRequest (*SystemCallResult)(nil), // 1: protobuf.SystemCallResult @@ -2228,20 +2319,22 @@ var file_spis_proto_goTypes = []interface{}{ (*PostToOutboxResult)(nil), // 29: protobuf.PostToOutboxResult (*GetOutboxRequest)(nil), // 30: protobuf.GetOutboxRequest (*GetOutboxResult)(nil), // 31: protobuf.GetOutboxResult - (*Document)(nil), // 32: protobuf.Document - (*ActivityPubLink)(nil), // 33: protobuf.ActivityPubLink - (*ActivityPubMedia)(nil), // 34: protobuf.ActivityPubMedia - (*ActivityPubPublicKey)(nil), // 35: protobuf.ActivityPubPublicKey - (*ActivityPubActivity)(nil), // 36: protobuf.ActivityPubActivity + (*PostToInboxRequest)(nil), // 32: protobuf.PostToInboxRequest + (*PostToInboxResult)(nil), // 33: protobuf.PostToInboxResult + (*Document)(nil), // 34: protobuf.Document + (*ActivityPubLink)(nil), // 35: protobuf.ActivityPubLink + (*ActivityPubMedia)(nil), // 36: protobuf.ActivityPubMedia + (*ActivityPubPublicKey)(nil), // 37: protobuf.ActivityPubPublicKey + (*ActivityPubActivity)(nil), // 38: protobuf.ActivityPubActivity } var file_spis_proto_depIdxs = []int32{ - 32, // 0: protobuf.EchoRequest.document:type_name -> protobuf.Document - 32, // 1: protobuf.EchoResult.document:type_name -> protobuf.Document - 33, // 2: protobuf.WebfingerResult.links:type_name -> protobuf.ActivityPubLink - 34, // 3: protobuf.GetActorResult.icon:type_name -> protobuf.ActivityPubMedia - 34, // 4: protobuf.GetActorResult.image:type_name -> protobuf.ActivityPubMedia - 35, // 5: protobuf.GetActorResult.publicKey:type_name -> protobuf.ActivityPubPublicKey - 36, // 6: protobuf.GetOutboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity + 34, // 0: protobuf.EchoRequest.document:type_name -> protobuf.Document + 34, // 1: protobuf.EchoResult.document:type_name -> protobuf.Document + 35, // 2: protobuf.WebfingerResult.links:type_name -> protobuf.ActivityPubLink + 36, // 3: protobuf.GetActorResult.icon:type_name -> protobuf.ActivityPubMedia + 36, // 4: protobuf.GetActorResult.image:type_name -> protobuf.ActivityPubMedia + 37, // 5: protobuf.GetActorResult.publicKey:type_name -> protobuf.ActivityPubPublicKey + 38, // 6: protobuf.GetOutboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity 7, // [7:7] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name @@ -2640,6 +2733,30 @@ func file_spis_proto_init() { return nil } } + file_spis_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostToInboxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spis_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostToInboxResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2647,7 +2764,7 @@ func file_spis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spis_proto_rawDesc, NumEnums: 0, - NumMessages: 32, + NumMessages: 34, NumExtensions: 0, NumServices: 0, }, diff --git a/greataped/components/api/protobuf/spis.proto b/greataped/components/api/protobuf/spis.proto index 265ea26..169b5d9 100644 --- a/greataped/components/api/protobuf/spis.proto +++ b/greataped/components/api/protobuf/spis.proto @@ -220,4 +220,13 @@ message GetOutboxResult { string first = 0x00000006; } +// API: PostToInbox +//----------------------------------------------------------- +message PostToInboxRequest { + string username = 0x00000001; +} + +message PostToInboxResult { +} + //----------------------------------------------------------- diff --git a/greataped/components/api/services/post_to_inbox_service.go b/greataped/components/api/services/post_to_inbox_service.go new file mode 100644 index 0000000..5dcc999 --- /dev/null +++ b/greataped/components/api/services/post_to_inbox_service.go @@ -0,0 +1,28 @@ +package services + +import ( + . "github.com/xeronith/diamante/contracts/service" + . "rail.town/infrastructure/components/api/protobuf" + . "rail.town/infrastructure/components/contracts" + "rail.town/infrastructure/components/core" +) + +// noinspection GoUnusedParameter +func PostToInboxService(context IContext, input *PostToInboxRequest) (result *PostToInboxResult, err error) { + conductor := core.Conductor + _ = POST_TO_INBOX_REQUEST + + conductor.LogRemoteCall(context, INITIALIZE, "post_to_inbox", input, result, err) + defer func() { conductor.LogRemoteCall(context, FINALIZE, "post_to_inbox", input, result, err) }() + + _result, _err := conductor.PostToInbox(input.Username, context.Identity()) + if _err != nil { + err = _err + return nil, err + } + + _ = _result + + result = context.ResultContainer().(*PostToInboxResult) + return result, nil +} diff --git a/greataped/components/contracts/api.go b/greataped/components/contracts/api.go index 81ed13e..5391eef 100644 --- a/greataped/components/contracts/api.go +++ b/greataped/components/contracts/api.go @@ -22,4 +22,5 @@ type IApi interface { GetFollowing(*GetFollowingRequest) (*GetFollowingResult, error) PostToOutbox(*PostToOutboxRequest) (*PostToOutboxResult, error) GetOutbox(*GetOutboxRequest) (*GetOutboxResult, error) + PostToInbox(*PostToInboxRequest) (*PostToInboxResult, error) } diff --git a/greataped/components/contracts/opcodes.go b/greataped/components/contracts/opcodes.go index 6001ed2..7ad396c 100644 --- a/greataped/components/contracts/opcodes.go +++ b/greataped/components/contracts/opcodes.go @@ -67,6 +67,10 @@ const ( //GetOutboxOperation GET_OUTBOX_REQUEST = 0x527B6997 GET_OUTBOX_RESULT = 0xF94E37A0 + + //PostToInboxOperation + POST_TO_INBOX_REQUEST = 0x7400C331 + POST_TO_INBOX_RESULT = 0x5BD43D90 ) var OPCODES = Opcodes{ @@ -101,4 +105,6 @@ var OPCODES = Opcodes{ 0xC6C56614: "PostToOutbox", 0x527B6997: "GET_OUTBOX", 0xF94E37A0: "GetOutbox", + 0x7400C331: "POST_TO_INBOX", + 0x5BD43D90: "PostToInbox", } diff --git a/greataped/components/contracts/spi.go b/greataped/components/contracts/spi.go index ce0f960..8649289 100644 --- a/greataped/components/contracts/spi.go +++ b/greataped/components/contracts/spi.go @@ -69,6 +69,7 @@ type ( GetFollowing(username string, editor Identity) (IGetFollowingResult, error) PostToOutbox(username string, context string, activityType string, to string, attributedTo string, inReplyTo string, content string, editor Identity) (IPostToOutboxResult, error) GetOutbox(username string, editor Identity) (IGetOutboxResult, error) + PostToInbox(username string, editor Identity) (IPostToInboxResult, error) } IEchoResult interface { @@ -171,4 +172,7 @@ type ( OrderedItems() []IActivityPubActivity First() string } + + IPostToInboxResult interface { + } ) diff --git a/greataped/components/contracts/system_component.go b/greataped/components/contracts/system_component.go index d030eb8..dfe5541 100644 --- a/greataped/components/contracts/system_component.go +++ b/greataped/components/contracts/system_component.go @@ -272,6 +272,7 @@ type ( GetFollowing(username string, editor Identity) (IGetFollowingResult, error) PostToOutbox(username string, context string, activityType string, to string, attributedTo string, inReplyTo string, content string, editor Identity) (IPostToOutboxResult, error) GetOutbox(username string, editor Identity) (IGetOutboxResult, error) + PostToInbox(username string, editor Identity) (IPostToInboxResult, error) NewDocument(id int64, content string) (IDocument, error) NewSystemSchedule(id int64, enabled bool, config string) (ISystemSchedule, error) @@ -305,6 +306,7 @@ type ( NewGetFollowingResult(context string, id string, type_ string, totalItems int32, orderedItems []string, first string, ignored interface{}) IGetFollowingResult NewPostToOutboxResult(ignored interface{}) IPostToOutboxResult NewGetOutboxResult(context string, id string, type_ string, totalItems int32, orderedItems []IActivityPubActivity, first string, ignored interface{}) IGetOutboxResult + NewPostToInboxResult(ignored interface{}) IPostToInboxResult } ISystemComponent interface { diff --git a/greataped/components/contracts/system_dispatcher.go b/greataped/components/contracts/system_dispatcher.go index 932590d..5c6ca2d 100644 --- a/greataped/components/contracts/system_dispatcher.go +++ b/greataped/components/contracts/system_dispatcher.go @@ -1046,6 +1046,7 @@ type IDispatcher interface { GetFollowing(username string) (IGetFollowingResult, error) PostToOutbox(username string, context string, activityType string, to string, attributedTo string, inReplyTo string, content string) (IPostToOutboxResult, error) GetOutbox(username string) (IGetOutboxResult, error) + PostToInbox(username string) (IPostToInboxResult, error) // NewDocument creates a new 'Document' instance using the provided property values. NewDocument(id int64, content string) (IDocument, error) @@ -1145,6 +1146,8 @@ type IDispatcher interface { NewPostToOutboxResult() IPostToOutboxResult // NewGetOutboxResult creates a new result container for 'Get Outbox' system action. NewGetOutboxResult(context string, id string, type_ string, totalItems int32, orderedItems []IActivityPubActivity, first string) IGetOutboxResult + // NewPostToInboxResult creates a new result container for 'Post To Inbox' system action. + NewPostToInboxResult() IPostToInboxResult // Assert asserts the provided condition and panics if the assertion is not valid. Assert(condition bool) IAssertionResult // AssertNoError panics if the provided error is not nil. diff --git a/greataped/components/core/api_methods.go b/greataped/components/core/api_methods.go index 0cc0fd0..0a398a3 100644 --- a/greataped/components/core/api_methods.go +++ b/greataped/components/core/api_methods.go @@ -165,6 +165,16 @@ func (api *api) GetOutbox(request *GetOutboxRequest) (*GetOutboxResult, error) { } } +func (api *api) PostToInbox(request *PostToInboxRequest) (*PostToInboxResult, error) { + result, err := api.call(POST_TO_INBOX_REQUEST, request) + + if err != nil { + return nil, err + } else { + return result.(*PostToInboxResult), nil + } +} + func init() { API_RESULT[SYSTEM_CALL_RESULT] = SystemCallResult{} API_RESULT[ECHO_RESULT] = EchoResult{} @@ -182,4 +192,5 @@ func init() { API_RESULT[GET_FOLLOWING_RESULT] = GetFollowingResult{} API_RESULT[POST_TO_OUTBOX_RESULT] = PostToOutboxResult{} API_RESULT[GET_OUTBOX_RESULT] = GetOutboxResult{} + API_RESULT[POST_TO_INBOX_RESULT] = PostToInboxResult{} } diff --git a/greataped/components/core/initializer.go b/greataped/components/core/initializer.go index 79095a6..c3ce881 100644 --- a/greataped/components/core/initializer.go +++ b/greataped/components/core/initializer.go @@ -1155,6 +1155,10 @@ func (conductor *conductor) GetOutbox(username string, editor Identity) (IGetOut return conductor.spiManager.GetOutbox(username, editor) } +func (conductor *conductor) PostToInbox(username string, editor Identity) (IPostToInboxResult, error) { + return conductor.spiManager.PostToInbox(username, editor) +} + func (conductor *conductor) NewDocument(id int64, content string) (IDocument, error) { return NewDocument(id, content) } @@ -1283,6 +1287,10 @@ func (conductor *conductor) NewGetOutboxResult(context string, id string, type_ return NewGetOutboxResult(context, id, type_, totalItems, orderedItems, first, nil) } +func (conductor *conductor) NewPostToInboxResult(_ interface{}) IPostToInboxResult { + return NewPostToInboxResult(nil) +} + func (conductor *conductor) LogRemoteCall(context IContext, eventType uint32, source string, input, result interface{}, err error) { errorMessage := "" if err != nil { diff --git a/greataped/components/core/spi.go b/greataped/components/core/spi.go index 04304c3..cc11ff8 100644 --- a/greataped/components/core/spi.go +++ b/greataped/components/core/spi.go @@ -294,3 +294,7 @@ func (dispatcher *dispatcher) PostToOutbox(username string, context string, acti func (dispatcher *dispatcher) GetOutbox(username string) (IGetOutboxResult, error) { return dispatcher.conductor.SpiManager().GetOutbox(username, dispatcher.identity) } + +func (dispatcher *dispatcher) PostToInbox(username string) (IPostToInboxResult, error) { + return dispatcher.conductor.SpiManager().PostToInbox(username, dispatcher.identity) +} diff --git a/greataped/components/core/spi_manager.go b/greataped/components/core/spi_manager.go index a7e4e53..74935c6 100644 --- a/greataped/components/core/spi_manager.go +++ b/greataped/components/core/spi_manager.go @@ -1002,3 +1002,31 @@ func (manager *spiManager) GetOutbox(username string, editor Identity) (result I return result, nil } } + +//region IPostToInboxResult Implementation + +type postToInboxResult struct { +} + +func NewPostToInboxResult(_ interface{}) IPostToInboxResult { + return &postToInboxResult{} +} + +//endregion + +func (manager *spiManager) PostToInbox(username string, editor Identity) (result IPostToInboxResult, err error) { + defer func() { + if reason := recover(); reason != nil { + err = manager.Error(reason) + } + }() + + editor.Lock(POST_TO_INBOX_REQUEST) + defer editor.Unlock(POST_TO_INBOX_REQUEST) + + if result, err = commands.PostToInbox(NewDispatcher(Conductor, editor), username); err != nil { + return nil, err + } else { + return result, nil + } +} diff --git a/greataped/components/core/system_results.go b/greataped/components/core/system_results.go index 821841a..dbe0ed9 100644 --- a/greataped/components/core/system_results.go +++ b/greataped/components/core/system_results.go @@ -64,4 +64,8 @@ func (dispatcher *dispatcher) NewGetOutboxResult(context string, id string, type return NewGetOutboxResult(context, id, type_, totalItems, orderedItems, first, nil) } +func (dispatcher *dispatcher) NewPostToInboxResult() IPostToInboxResult { + return NewPostToInboxResult(nil) +} + //endregion