mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
402 lines
20 KiB
Go
402 lines
20 KiB
Go
// GENERATED BY portalinternal_generate.go; DO NOT EDIT
|
|
|
|
//go:generate go run portalinternal_generate.go
|
|
//go:generate goimports -local maunium.net/go/mautrix -w portalinternal.go
|
|
|
|
package bridgev2
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/rs/zerolog"
|
|
|
|
"maunium.net/go/mautrix"
|
|
"maunium.net/go/mautrix/bridgev2/database"
|
|
"maunium.net/go/mautrix/bridgev2/networkid"
|
|
"maunium.net/go/mautrix/event"
|
|
"maunium.net/go/mautrix/id"
|
|
)
|
|
|
|
type PortalInternals Portal
|
|
|
|
// Deprecated: portal internals should be used carefully and only when necessary.
|
|
func (portal *Portal) Internal() *PortalInternals {
|
|
return (*PortalInternals)(portal)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateLogger() {
|
|
(*Portal)(portal).updateLogger()
|
|
}
|
|
|
|
func (portal *PortalInternals) QueueEvent(ctx context.Context, evt portalEvent) EventHandlingResult {
|
|
return (*Portal)(portal).queueEvent(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) EventLoop() {
|
|
(*Portal)(portal).eventLoop()
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleSingleEventWithDelayLogging(idx int, rawEvt any) (outerRes EventHandlingResult) {
|
|
return (*Portal)(portal).handleSingleEventWithDelayLogging(idx, rawEvt)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetEventCtxWithLog(rawEvt any, idx int) context.Context {
|
|
return (*Portal)(portal).getEventCtxWithLog(rawEvt, idx)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleSingleEvent(ctx context.Context, rawEvt any, doneCallback func(EventHandlingResult)) {
|
|
(*Portal)(portal).handleSingleEvent(ctx, rawEvt, doneCallback)
|
|
}
|
|
|
|
func (portal *PortalInternals) UnwrapBeeperSendState(ctx context.Context, evt *event.Event) error {
|
|
return (*Portal)(portal).unwrapBeeperSendState(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendSuccessStatus(ctx context.Context, evt *event.Event, streamOrder int64, newEventID id.EventID) {
|
|
(*Portal)(portal).sendSuccessStatus(ctx, evt, streamOrder, newEventID)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendErrorStatus(ctx context.Context, evt *event.Event, err error) {
|
|
(*Portal)(portal).sendErrorStatus(ctx, evt, err)
|
|
}
|
|
|
|
func (portal *PortalInternals) CheckConfusableName(ctx context.Context, userID id.UserID, name string) bool {
|
|
return (*Portal)(portal).checkConfusableName(ctx, userID, name)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixEvent(ctx context.Context, sender *User, evt *event.Event, isStateRequest bool) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixEvent(ctx, sender, evt, isStateRequest)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixReceipts(ctx context.Context, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixReceipts(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixReadReceipt(ctx context.Context, user *User, eventID id.EventID, receipt event.ReadReceipt) {
|
|
(*Portal)(portal).handleMatrixReadReceipt(ctx, user, eventID, receipt)
|
|
}
|
|
|
|
func (portal *PortalInternals) CallReadReceiptHandler(ctx context.Context, login *UserLogin, rrClient ReadReceiptHandlingNetworkAPI, evt *MatrixReadReceipt, userPortal *database.UserPortal) {
|
|
(*Portal)(portal).callReadReceiptHandler(ctx, login, rrClient, evt, userPortal)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixTyping(ctx context.Context, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixTyping(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendTypings(ctx context.Context, userIDs []id.UserID, typing bool) {
|
|
(*Portal)(portal).sendTypings(ctx, userIDs, typing)
|
|
}
|
|
|
|
func (portal *PortalInternals) PeriodicTypingUpdater() {
|
|
(*Portal)(portal).periodicTypingUpdater()
|
|
}
|
|
|
|
func (portal *PortalInternals) CheckMessageContentCaps(caps *event.RoomFeatures, content *event.MessageEventContent) error {
|
|
return (*Portal)(portal).checkMessageContentCaps(caps, content)
|
|
}
|
|
|
|
func (portal *PortalInternals) ParseInputTransactionID(origSender *OrigSender, evt *event.Event) networkid.RawTransactionID {
|
|
return (*Portal)(portal).parseInputTransactionID(origSender, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixMessage(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixMessage(ctx, sender, origSender, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) PendingMessageTimeoutLoop(ctx context.Context, cfg *OutgoingTimeoutConfig) {
|
|
(*Portal)(portal).pendingMessageTimeoutLoop(ctx, cfg)
|
|
}
|
|
|
|
func (portal *PortalInternals) CheckPendingMessages(ctx context.Context, cfg *OutgoingTimeoutConfig) {
|
|
(*Portal)(portal).checkPendingMessages(ctx, cfg)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixEdit(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event, content *event.MessageEventContent, caps *event.RoomFeatures) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixEdit(ctx, sender, origSender, evt, content, caps)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixReaction(ctx context.Context, sender *UserLogin, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixReaction(ctx, sender, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetTargetUser(ctx context.Context, userID id.UserID) (GhostOrUserLogin, error) {
|
|
return (*Portal)(portal).getTargetUser(ctx, userID)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixDeleteChat(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixDeleteChat(ctx, sender, origSender, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixMembership(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event, isStateRequest bool) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixMembership(ctx, sender, origSender, evt, isStateRequest)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixPowerLevels(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event, isStateRequest bool) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixPowerLevels(ctx, sender, origSender, evt, isStateRequest)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixTombstone(ctx context.Context, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixTombstone(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateInfoAfterTombstone(ctx context.Context, senderUser *User) {
|
|
(*Portal)(portal).updateInfoAfterTombstone(ctx, senderUser)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleMatrixRedaction(ctx context.Context, sender *UserLogin, origSender *OrigSender, evt *event.Event) EventHandlingResult {
|
|
return (*Portal)(portal).handleMatrixRedaction(ctx, sender, origSender, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteEvent(ctx context.Context, source *UserLogin, evtType RemoteEventType, evt RemoteEvent) (res EventHandlingResult) {
|
|
return (*Portal)(portal).handleRemoteEvent(ctx, source, evtType, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) EnsureFunctionalMember(ctx context.Context, ghost *Ghost) {
|
|
(*Portal)(portal).ensureFunctionalMember(ctx, ghost)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetIntentAndUserMXIDFor(ctx context.Context, sender EventSender, source *UserLogin, otherLogins []*UserLogin, evtType RemoteEventType) (intent MatrixAPI, extraUserID id.UserID, err error) {
|
|
return (*Portal)(portal).getIntentAndUserMXIDFor(ctx, sender, source, otherLogins, evtType)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetRelationMeta(ctx context.Context, currentMsgID networkid.MessageID, currentMsg *ConvertedMessage, isBatchSend bool) (replyTo, threadRoot, prevThreadEvent *database.Message) {
|
|
return (*Portal)(portal).getRelationMeta(ctx, currentMsgID, currentMsg, isBatchSend)
|
|
}
|
|
|
|
func (portal *PortalInternals) ApplyRelationMeta(ctx context.Context, content *event.MessageEventContent, replyTo, threadRoot, prevThreadEvent *database.Message) {
|
|
(*Portal)(portal).applyRelationMeta(ctx, content, replyTo, threadRoot, prevThreadEvent)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendConvertedMessage(ctx context.Context, id networkid.MessageID, intent MatrixAPI, senderID networkid.UserID, converted *ConvertedMessage, ts time.Time, streamOrder int64, logContext func(*zerolog.Event) *zerolog.Event) ([]*database.Message, EventHandlingResult) {
|
|
return (*Portal)(portal).sendConvertedMessage(ctx, id, intent, senderID, converted, ts, streamOrder, logContext)
|
|
}
|
|
|
|
func (portal *PortalInternals) CheckPendingMessage(ctx context.Context, evt RemoteMessage) (bool, *database.Message) {
|
|
return (*Portal)(portal).checkPendingMessage(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteUpsert(ctx context.Context, source *UserLogin, evt RemoteMessageUpsert, existing []*database.Message) (handleRes EventHandlingResult, continueHandling bool) {
|
|
return (*Portal)(portal).handleRemoteUpsert(ctx, source, evt, existing)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteMessage(ctx context.Context, source *UserLogin, evt RemoteMessage) (res EventHandlingResult) {
|
|
return (*Portal)(portal).handleRemoteMessage(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendRemoteErrorNotice(ctx context.Context, intent MatrixAPI, err error, ts time.Time, evtTypeName string) {
|
|
(*Portal)(portal).sendRemoteErrorNotice(ctx, intent, err, ts, evtTypeName)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteEdit(ctx context.Context, source *UserLogin, evt RemoteEdit) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteEdit(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendConvertedEdit(ctx context.Context, targetID networkid.MessageID, senderID networkid.UserID, converted *ConvertedEdit, intent MatrixAPI, ts time.Time, streamOrder int64) EventHandlingResult {
|
|
return (*Portal)(portal).sendConvertedEdit(ctx, targetID, senderID, converted, intent, ts, streamOrder)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetTargetMessagePart(ctx context.Context, evt RemoteEventWithTargetMessage) (*database.Message, error) {
|
|
return (*Portal)(portal).getTargetMessagePart(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetTargetReaction(ctx context.Context, evt RemoteReactionRemove) (*database.Reaction, error) {
|
|
return (*Portal)(portal).getTargetReaction(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteReactionSync(ctx context.Context, source *UserLogin, evt RemoteReactionSync) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteReactionSync(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteReaction(ctx context.Context, source *UserLogin, evt RemoteReaction) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteReaction(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendConvertedReaction(ctx context.Context, senderID networkid.UserID, intent MatrixAPI, targetMessage *database.Message, emojiID networkid.EmojiID, emoji string, ts time.Time, dbMetadata any, extraContent map[string]any, logContext func(*zerolog.Event) *zerolog.Event) EventHandlingResult {
|
|
return (*Portal)(portal).sendConvertedReaction(ctx, senderID, intent, targetMessage, emojiID, emoji, ts, dbMetadata, extraContent, logContext)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetIntentForMXID(ctx context.Context, userID id.UserID) (MatrixAPI, error) {
|
|
return (*Portal)(portal).getIntentForMXID(ctx, userID)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteReactionRemove(ctx context.Context, source *UserLogin, evt RemoteReactionRemove) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteReactionRemove(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteMessageRemove(ctx context.Context, source *UserLogin, evt RemoteMessageRemove) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteMessageRemove(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) RedactMessageParts(ctx context.Context, parts []*database.Message, intent MatrixAPI, ts time.Time) EventHandlingResult {
|
|
return (*Portal)(portal).redactMessageParts(ctx, parts, intent, ts)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteReadReceipt(ctx context.Context, source *UserLogin, evt RemoteReadReceipt) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteReadReceipt(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteMarkUnread(ctx context.Context, source *UserLogin, evt RemoteMarkUnread) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteMarkUnread(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteDeliveryReceipt(ctx context.Context, source *UserLogin, evt RemoteDeliveryReceipt) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteDeliveryReceipt(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteTyping(ctx context.Context, source *UserLogin, evt RemoteTyping) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteTyping(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteChatInfoChange(ctx context.Context, source *UserLogin, evt RemoteChatInfoChange) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteChatInfoChange(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteChatResync(ctx context.Context, source *UserLogin, evt RemoteChatResync) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteChatResync(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) FindOtherLogins(ctx context.Context, source *UserLogin) (ownUP *database.UserPortal, others []*database.UserPortal, err error) {
|
|
return (*Portal)(portal).findOtherLogins(ctx, source)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteChatDelete(ctx context.Context, source *UserLogin, evt RemoteChatDelete) EventHandlingResult {
|
|
return (*Portal)(portal).handleRemoteChatDelete(ctx, source, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) HandleRemoteBackfill(ctx context.Context, source *UserLogin, backfill RemoteBackfill) (res EventHandlingResult) {
|
|
return (*Portal)(portal).handleRemoteBackfill(ctx, source, backfill)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateName(ctx context.Context, name string, sender MatrixAPI, ts time.Time, excludeFromTimeline bool) bool {
|
|
return (*Portal)(portal).updateName(ctx, name, sender, ts, excludeFromTimeline)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateTopic(ctx context.Context, topic string, sender MatrixAPI, ts time.Time, excludeFromTimeline bool) bool {
|
|
return (*Portal)(portal).updateTopic(ctx, topic, sender, ts, excludeFromTimeline)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateAvatar(ctx context.Context, avatar *Avatar, sender MatrixAPI, ts time.Time, excludeFromTimeline bool) bool {
|
|
return (*Portal)(portal).updateAvatar(ctx, avatar, sender, ts, excludeFromTimeline)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetBridgeInfoStateKey() string {
|
|
return (*Portal)(portal).getBridgeInfoStateKey()
|
|
}
|
|
|
|
func (portal *PortalInternals) GetBridgeInfo() (string, event.BridgeEventContent) {
|
|
return (*Portal)(portal).getBridgeInfo()
|
|
}
|
|
|
|
func (portal *PortalInternals) SendStateWithIntentOrBot(ctx context.Context, sender MatrixAPI, eventType event.Type, stateKey string, content *event.Content, ts time.Time) (resp *mautrix.RespSendEvent, err error) {
|
|
return (*Portal)(portal).sendStateWithIntentOrBot(ctx, sender, eventType, stateKey, content, ts)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendRoomMeta(ctx context.Context, sender MatrixAPI, ts time.Time, eventType event.Type, stateKey string, content any, excludeFromTimeline bool, extra map[string]any) bool {
|
|
return (*Portal)(portal).sendRoomMeta(ctx, sender, ts, eventType, stateKey, content, excludeFromTimeline, extra)
|
|
}
|
|
|
|
func (portal *PortalInternals) RevertRoomMeta(ctx context.Context, evt *event.Event) {
|
|
(*Portal)(portal).revertRoomMeta(ctx, evt)
|
|
}
|
|
|
|
func (portal *PortalInternals) GetInitialMemberList(ctx context.Context, members *ChatMemberList, source *UserLogin, pl *event.PowerLevelsEventContent) (invite, functional []id.UserID, err error) {
|
|
return (*Portal)(portal).getInitialMemberList(ctx, members, source, pl)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateOtherUser(ctx context.Context, members *ChatMemberList) (changed bool) {
|
|
return (*Portal)(portal).updateOtherUser(ctx, members)
|
|
}
|
|
|
|
func (portal *PortalInternals) RoomIsPublic(ctx context.Context) bool {
|
|
return (*Portal)(portal).roomIsPublic(ctx)
|
|
}
|
|
|
|
func (portal *PortalInternals) SyncParticipants(ctx context.Context, members *ChatMemberList, source *UserLogin, sender MatrixAPI, ts time.Time) error {
|
|
return (*Portal)(portal).syncParticipants(ctx, members, source, sender, ts)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateUserLocalInfo(ctx context.Context, info *UserLocalPortalInfo, source *UserLogin, didJustCreate bool) {
|
|
(*Portal)(portal).updateUserLocalInfo(ctx, info, source, didJustCreate)
|
|
}
|
|
|
|
func (portal *PortalInternals) UpdateParent(ctx context.Context, newParentID networkid.PortalID, source *UserLogin) bool {
|
|
return (*Portal)(portal).updateParent(ctx, newParentID, source)
|
|
}
|
|
|
|
func (portal *PortalInternals) LockedUpdateInfoFromGhost(ctx context.Context, ghost *Ghost) {
|
|
(*Portal)(portal).lockedUpdateInfoFromGhost(ctx, ghost)
|
|
}
|
|
|
|
func (portal *PortalInternals) CreateMatrixRoomInLoop(ctx context.Context, source *UserLogin, info *ChatInfo, backfillBundle any) error {
|
|
return (*Portal)(portal).createMatrixRoomInLoop(ctx, source, info, backfillBundle)
|
|
}
|
|
|
|
func (portal *PortalInternals) AddToUserSpaces(ctx context.Context) {
|
|
(*Portal)(portal).addToUserSpaces(ctx)
|
|
}
|
|
|
|
func (portal *PortalInternals) RemoveInPortalCache(ctx context.Context) {
|
|
(*Portal)(portal).removeInPortalCache(ctx)
|
|
}
|
|
|
|
func (portal *PortalInternals) UnlockedDelete(ctx context.Context) error {
|
|
return (*Portal)(portal).unlockedDelete(ctx)
|
|
}
|
|
|
|
func (portal *PortalInternals) UnlockedDeleteCache() {
|
|
(*Portal)(portal).unlockedDeleteCache()
|
|
}
|
|
|
|
func (portal *PortalInternals) DoForwardBackfill(ctx context.Context, source *UserLogin, lastMessage *database.Message, bundledData any) {
|
|
(*Portal)(portal).doForwardBackfill(ctx, source, lastMessage, bundledData)
|
|
}
|
|
|
|
func (portal *PortalInternals) FetchThreadBackfill(ctx context.Context, source *UserLogin, anchor *database.Message) *FetchMessagesResponse {
|
|
return (*Portal)(portal).fetchThreadBackfill(ctx, source, anchor)
|
|
}
|
|
|
|
func (portal *PortalInternals) DoThreadBackfill(ctx context.Context, source *UserLogin, threadID networkid.MessageID) {
|
|
(*Portal)(portal).doThreadBackfill(ctx, source, threadID)
|
|
}
|
|
|
|
func (portal *PortalInternals) CutoffMessages(ctx context.Context, messages []*BackfillMessage, aggressiveDedup, forward bool, lastMessage *database.Message) []*BackfillMessage {
|
|
return (*Portal)(portal).cutoffMessages(ctx, messages, aggressiveDedup, forward, lastMessage)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendBackfill(ctx context.Context, source *UserLogin, messages []*BackfillMessage, forceForward, markRead, inThread bool, done func()) {
|
|
(*Portal)(portal).sendBackfill(ctx, source, messages, forceForward, markRead, inThread, done)
|
|
}
|
|
|
|
func (portal *PortalInternals) CompileBatchMessage(ctx context.Context, source *UserLogin, msg *BackfillMessage, out *compileBatchOutput, inThread bool) {
|
|
(*Portal)(portal).compileBatchMessage(ctx, source, msg, out, inThread)
|
|
}
|
|
|
|
func (portal *PortalInternals) FetchThreadInsideBatch(ctx context.Context, source *UserLogin, dbMsg *database.Message, out *compileBatchOutput) {
|
|
(*Portal)(portal).fetchThreadInsideBatch(ctx, source, dbMsg, out)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendBatch(ctx context.Context, source *UserLogin, messages []*BackfillMessage, forceForward, markRead, inThread bool) {
|
|
(*Portal)(portal).sendBatch(ctx, source, messages, forceForward, markRead, inThread)
|
|
}
|
|
|
|
func (portal *PortalInternals) SendLegacyBackfill(ctx context.Context, source *UserLogin, messages []*BackfillMessage, markRead bool) {
|
|
(*Portal)(portal).sendLegacyBackfill(ctx, source, messages, markRead)
|
|
}
|
|
|
|
func (portal *PortalInternals) UnlockedReID(ctx context.Context, target networkid.PortalKey) error {
|
|
return (*Portal)(portal).unlockedReID(ctx, target)
|
|
}
|
|
|
|
func (portal *PortalInternals) CreateParentAndAddToSpace(ctx context.Context, source *UserLogin) {
|
|
(*Portal)(portal).createParentAndAddToSpace(ctx, source)
|
|
}
|
|
|
|
func (portal *PortalInternals) AddToParentSpaceAndSave(ctx context.Context, save bool) {
|
|
(*Portal)(portal).addToParentSpaceAndSave(ctx, save)
|
|
}
|
|
|
|
func (portal *PortalInternals) ToggleSpace(ctx context.Context, spaceID id.RoomID, canonical, remove bool) error {
|
|
return (*Portal)(portal).toggleSpace(ctx, spaceID, canonical, remove)
|
|
}
|