( ctx context.Context, id toolspkg.ToolID, ref store.NetworkConversationRef, input networkConversationMessageQueryInput, )
| 1888 | } |
| 1889 | |
| 1890 | func (n *daemonNativeTools) networkConversationMessages( |
| 1891 | ctx context.Context, |
| 1892 | id toolspkg.ToolID, |
| 1893 | ref store.NetworkConversationRef, |
| 1894 | input networkConversationMessageQueryInput, |
| 1895 | ) ([]contract.NetworkConversationMessagePayload, error) { |
| 1896 | if err := ref.Validate(); err != nil { |
| 1897 | return nil, nativeNetworkInputError(id, err) |
| 1898 | } |
| 1899 | query := store.NetworkConversationMessageQuery{ |
| 1900 | BeforeMessageID: strings.TrimSpace(input.Before), |
| 1901 | AfterMessageID: strings.TrimSpace(input.After), |
| 1902 | Kind: strings.TrimSpace(input.Kind), |
| 1903 | WorkID: strings.TrimSpace(input.WorkID), |
| 1904 | Limit: input.Limit, |
| 1905 | } |
| 1906 | if err := query.Validate(); err != nil { |
| 1907 | return nil, nativeNetworkInputError(id, err) |
| 1908 | } |
| 1909 | messages, err := n.deps.NetworkStore.ListConversationMessages(ctx, ref, query) |
| 1910 | if err != nil { |
| 1911 | return nil, err |
| 1912 | } |
| 1913 | return core.NetworkConversationMessagePayloadsFromStore(messages), nil |
| 1914 | } |
| 1915 | |
| 1916 | func (n *daemonNativeTools) resolveNetworkDirectRoomPeers( |
| 1917 | ctx context.Context, |
no test coverage detected