 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package hooks exposes places in Dendrite where custom code can be executed, useful for MSCs. Hooks can only be run in monolith mode.
Index ¶
Constants ¶
      View Source
      
  
const ( // KindNewEventPersisted is a hook which is called with *types.HeaderedEvent // It is run when a new event is persisted in the roomserver. // Usage: // hooks.Attach(hooks.KindNewEventPersisted, func(headeredEvent interface{}) { ... }) KindNewEventPersisted = "new_event_persisted" // KindNewEventReceived is a hook which is called with *types.HeaderedEvent // It is run before a new event is processed by the roomserver. This hook can be used // to modify the event before it is persisted by adding data to `unsigned`. // Usage: // hooks.Attach(hooks.KindNewEventReceived, func(headeredEvent interface{}) { // ev := headeredEvent.(*types.HeaderedEvent) // _ = ev.SetUnsignedField("key", "val") // }) KindNewEventReceived = "new_event_received" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.