hook.hangoutslock#

class immp.hook.hangoutslock.HangoutsLockHook(name, config, host, virtual=False)#

Bases: Hook

Hook to enforce the history and link-join settings in Hangouts.

async on_receive(sent, source, primary)#

Handle an incoming message received by any plug.

Parameters:
  • sent (.SentMessage) – Raw message received from another plug.

  • source (.Message) – Original message data used to generate the raw message, if sent via the plug (e.g. from another hook), equivalent to msg if the source is otherwise unknown.

  • primary (bool) – False for supplementary messages if the source message required multiple raw messages in order to represent it (e.g. messages with multiple attachments where the underlying network doesn’t support it), otherwise True.