Files
mautrix-discord/database/portalkey.go
Gary Kramlich 680f7bdbea A ton of work getting towards dms.
This commit also points to my fork of discordgo which makes it look like the
official client which is the only way to get the actually contents of a dm
when not authorized as a bot.
2022-01-25 23:22:20 -06:00

21 lines
326 B
Go

package database
type PortalKey struct {
ID string
ChannelID string
}
func NewPortalKey(id, channelID string) PortalKey {
return PortalKey{
ID: id,
ChannelID: channelID,
}
}
func (key PortalKey) String() string {
if key.ChannelID == key.ID {
return key.ID
}
return key.ID + "-" + key.ChannelID
}