( bound *nativeBoundSessionScope, messages []network.Envelope, )
| 4851 | } |
| 4852 | |
| 4853 | func nativeFilterNetworkEnvelopes( |
| 4854 | bound *nativeBoundSessionScope, |
| 4855 | messages []network.Envelope, |
| 4856 | ) []network.Envelope { |
| 4857 | if bound == nil || len(bound.networkChannels) == 0 { |
| 4858 | return messages |
| 4859 | } |
| 4860 | filtered := make([]network.Envelope, 0, len(messages)) |
| 4861 | for _, message := range messages { |
| 4862 | if nativeBoundSessionAllowsChannel(bound, message.Channel) { |
| 4863 | filtered = append(filtered, message) |
| 4864 | } |
| 4865 | } |
| 4866 | return filtered |
| 4867 | } |
| 4868 | |
| 4869 | func nativeBoundChannelDenied(id toolspkg.ToolID, channel string) error { |
| 4870 | return toolspkg.NewToolError( |
no test coverage detected