MCPcopy Create free account
hub / github.com/daodst/chat / pushRuleSetKindPointer

Function pushRuleSetKindPointer

clientapi/routing/pushrules.go:300–315  ·  view source on GitHub ↗
(ruleSet *pushrules.RuleSet, kind pushrules.Kind)

Source from the content-addressed store, hash-verified

298}
299
300func pushRuleSetKindPointer(ruleSet *pushrules.RuleSet, kind pushrules.Kind) *[]*pushrules.Rule {
301 switch kind {
302 case pushrules.OverrideKind:
303 return &ruleSet.Override
304 case pushrules.ContentKind:
305 return &ruleSet.Content
306 case pushrules.RoomKind:
307 return &ruleSet.Room
308 case pushrules.SenderKind:
309 return &ruleSet.Sender
310 case pushrules.UnderrideKind:
311 return &ruleSet.Underride
312 default:
313 return nil
314 }
315}
316
317func pushRuleIndexByID(rules []*pushrules.Rule, id string) int {
318 for i, rule := range rules {

Callers 6

GetPushRulesByKindFunction · 0.85
GetPushRuleByRuleIDFunction · 0.85
PutPushRuleByRuleIDFunction · 0.85
DeletePushRuleByRuleIDFunction · 0.85
GetPushRuleAttrByRuleIDFunction · 0.85
PutPushRuleAttrByRuleIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected