hook.notes

class immp.hook.notes.Note(**kwargs: Any)

Bases: Model

Representation of a single note.

timestamp

Creation time of the note.

Type:

int

network

Network identifier for the channel’s plug.

Type:

str

channel

Channel identifier where the note was created.

Type:

str

user

User identifier of the note’s author.

Type:

str

text

Note content.

Type:

str

class immp.hook.notes.NotesHook(name, config, host, virtual=False)

Bases: Hook

Hook for managing and recalling notes in channels.

schema = None
on_load()

Perform any additional one-time setup that requires other plugs or hooks to be loaded.

async channel_migrate(old, new)

Move any private data between channels on admin request. This is intended to cover data keyed by channel sources and plug network identifiers.

Parameters:
  • old (.Channel) – Existing channel with local data.

  • new (.Channel) – Target replacement channel to migrate data to.

Returns:

True if any data was migrated for the requested channel.

Return type:

bool