Documentation ¶
Index ¶
- Variables
- type ConvertedSlackMessage
- type MessageConverter
- func (mc *MessageConverter) EditToMatrix(ctx context.Context, portal *bridgev2.Portal, intent bridgev2.MatrixAPI, ...) *bridgev2.ConvertedEdit
- func (mc *MessageConverter) GetMentionedRoomInfo(ctx context.Context, channelID string) (mxid id.RoomID, alias id.RoomAlias, name string)
- func (mc *MessageConverter) GetMentionedUserInfo(ctx context.Context, userID string) (mxid id.UserID, name string)
- func (mc *MessageConverter) ToMatrix(ctx context.Context, portal *bridgev2.Portal, intent bridgev2.MatrixAPI, ...) *bridgev2.ConvertedMessage
- func (mc *MessageConverter) ToSlack(ctx context.Context, client *slack.Client, portal *bridgev2.Portal, ...) (conv *ConvertedSlackMessage, err error)
- type SlackClientProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownMsgType = errors.New("unknown msgtype") ErrMediaDownloadFailed = errors.New("failed to download media") ErrMediaUploadFailed = errors.New("failed to reupload media") ErrMediaConvertFailed = errors.New("failed to re-encode media") ErrMediaOnlyEditCaption = errors.New("only media message caption can be edited") )
Functions ¶
This section is empty.
Types ¶
type ConvertedSlackMessage ¶
type ConvertedSlackMessage struct { SendReq slack.MsgOption FileUpload *slack.UploadFileV2Parameters }
type MessageConverter ¶
type MessageConverter struct { Bridge *bridgev2.Bridge HTTP http.Client MatrixHTMLParser *matrixfmt.HTMLParser SlackMrkdwnParser *mrkdwn.SlackMrkdwnParser ServerName string MaxFileSize int }
func (*MessageConverter) EditToMatrix ¶
func (*MessageConverter) GetMentionedRoomInfo ¶
func (*MessageConverter) GetMentionedUserInfo ¶
func (*MessageConverter) ToSlack ¶
func (mc *MessageConverter) ToSlack( ctx context.Context, client *slack.Client, portal *bridgev2.Portal, content *event.MessageEventContent, evt *event.Event, threadRoot *database.Message, editTarget *database.Message, origSender *bridgev2.OrigSender, isRealUser bool, ) (conv *ConvertedSlackMessage, err error)
Click to show internal directories.
Click to hide internal directories.