msgprocessor

package
v3.3.3-rc.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenConversationUniqueKey

func GenConversationUniqueKey(msg *sdkws.MsgData) string

func GetChatConversationIDByMsg

func GetChatConversationIDByMsg(msg *sdkws.MsgData) string

func GetConversationIDByMsg

func GetConversationIDByMsg(msg *sdkws.MsgData) string

func GetConversationIDBySessionType

func GetConversationIDBySessionType(sessionType int, ids ...string) string

func GetNotificationConversationID

func GetNotificationConversationID(sessionType int, ids ...string) string

func GetNotificationConversationIDByConversationID

func GetNotificationConversationIDByConversationID(conversationID string) string

func GetNotificationConversationIDByMsg

func GetNotificationConversationIDByMsg(msg *sdkws.MsgData) string

func IsNotification

func IsNotification(conversationID string) bool

func IsNotificationByMsg

func IsNotificationByMsg(msg *sdkws.MsgData) bool

func ParseConversationID

func ParseConversationID(msg *sdkws.MsgData) (isNotification bool, conversationID string)

func Pb2String

func Pb2String(pb proto.Message) (string, error)

func String2Pb

func String2Pb(s string, pb proto.Message) error

Types

type MsgBySeq

type MsgBySeq []*sdkws.MsgData

func (MsgBySeq) Len

func (s MsgBySeq) Len() int

func (MsgBySeq) Less

func (s MsgBySeq) Less(i, j int) bool

func (MsgBySeq) Swap

func (s MsgBySeq) Swap(i, j int)

type Options

type Options map[string]bool

func NewMsgOptions

func NewMsgOptions() Options

func NewOptions

func NewOptions(opts ...OptionsOpt) Options

func WithOptions

func WithOptions(options Options, opts ...OptionsOpt) Options

func (Options) Is

func (o Options) Is(notification string) bool

func (Options) IsConversationUpdate

func (o Options) IsConversationUpdate() bool

func (Options) IsHistory

func (o Options) IsHistory() bool

func (Options) IsNotNotification

func (o Options) IsNotNotification() bool

func (Options) IsNotPrivate

func (o Options) IsNotPrivate() bool

func (Options) IsOfflinePush

func (o Options) IsOfflinePush() bool

func (Options) IsPersistent

func (o Options) IsPersistent() bool

func (Options) IsReactionFromCache

func (o Options) IsReactionFromCache() bool

func (Options) IsSendMsg

func (o Options) IsSendMsg() bool

func (Options) IsSenderConversationUpdate

func (o Options) IsSenderConversationUpdate() bool

func (Options) IsSenderNotificationPush

func (o Options) IsSenderNotificationPush() bool

func (Options) IsSenderSync

func (o Options) IsSenderSync() bool

func (Options) IsUnreadCount

func (o Options) IsUnreadCount() bool

type OptionsOpt

type OptionsOpt func(Options)

func WithConversationUpdate

func WithConversationUpdate() OptionsOpt

func WithHistory

func WithHistory(b bool) OptionsOpt

func WithNotNotification

func WithNotNotification(b bool) OptionsOpt

func WithNotPrivate

func WithNotPrivate() OptionsOpt

func WithOfflinePush

func WithOfflinePush(b bool) OptionsOpt

func WithPersistent

func WithPersistent() OptionsOpt

func WithReactionFromCache

func WithReactionFromCache() OptionsOpt

func WithSendMsg

func WithSendMsg(b bool) OptionsOpt

func WithSenderConversationUpdate

func WithSenderConversationUpdate() OptionsOpt

func WithSenderNotificationPush

func WithSenderNotificationPush() OptionsOpt

func WithSenderSync

func WithSenderSync() OptionsOpt

func WithUnreadCount

func WithUnreadCount(b bool) OptionsOpt

Jump to

Keyboard shortcuts

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