messengerpayloads

package
v2.387.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilPayload = errcode.ErrInvalidInput.Wrap(errors.New("nil payload"))

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

func NewEventHandler

func NewEventHandler(ctx context.Context, db *messengerdb.DBWrapper, metaFetcher MetaFetcher, postHandlerActions mt.EventHandlerPostActions, logger *zap.Logger, dispatcher messengerutil.Dispatcher, replay bool) *EventHandler

func (*EventHandler) Ctx

func (h *EventHandler) Ctx() context.Context

func (*EventHandler) GetAlreadyHandledMessage added in v2.316.0

func (h *EventHandler) GetAlreadyHandledMessage(cid ipfscid.Cid) (bool, *mt.Interaction, error)

func (*EventHandler) HandleAppMessage

func (h *EventHandler) HandleAppMessage(gpk string, gme *protocoltypes.GroupMessageEvent, am *mt.AppMessage) (err error)

func (*EventHandler) HandleMetadataEvent

func (h *EventHandler) HandleMetadataEvent(gme *protocoltypes.GroupMetadataEvent) error

func (*EventHandler) HandleOutOfStoreAppMessage

func (h *EventHandler) HandleOutOfStoreAppMessage(groupPK []byte, message *protocoltypes.OutOfStoreMessage, payload []byte) (*mt.Interaction, bool, error)

func (*EventHandler) Logger

func (h *EventHandler) Logger() *zap.Logger

func (*EventHandler) WithContext

func (h *EventHandler) WithContext(ctx context.Context) *EventHandler

type MetaFetcher

type MetaFetcher interface {
	GroupPKForContact(ctx context.Context, pk []byte) ([]byte, error)
	OwnMemberAndDevicePKForConversation(ctx context.Context, pk []byte) (member []byte, device []byte, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL