Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Better set of channel name
  • Loading branch information
lil5 committed Nov 20, 2025
commit 0ca3b6f29bc9cc05fc846dfb5558f7dc3b6c4eed
6 changes: 1 addition & 5 deletions bridge/mastodon/mastodon.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,24 @@ func (b *Bmastodon) JoinChannel(channel config.ChannelInfo) error {
var err error
ctx, ctxCancel := context.WithCancel(context.Background())
room := Broom{
channel: "",
channel: channel.Name,
ctx: ctx,
ctxCancel: ctxCancel,
}
if channel.Name == "home" {
// You are talking to the home channel
room.channel = "home"
channelType = channelTypeHome
ch, err = b.c.StreamingUser(ctx)
} else if channel.Name == "local" {
// You are talking to the local channel
room.channel = "local"
channelType = channelTypeLocal
ch, err = b.c.StreamingPublic(ctx, true)
} else if channel.Name == "remote" {
// You are talking to the remote channel
room.channel = "remote"
channelType = channelTypeRemote
ch, err = b.c.StreamingPublic(ctx, false)
} else if strings.HasPrefix(channel.Name, "@") {
// You are talking to a private user
room.channel = channel.Name
channelType = channelTypeDirect
ch, err = b.c.StreamingDirect(ctx)
} else {
Expand Down
Loading