Tons of works on dm's.

They mostly work including display names and avatars. However that's about all
they do right now.
This commit is contained in:
Gary Kramlich
2022-01-31 04:53:21 -06:00
parent f20d204dd7
commit c1bb55d3cf
11 changed files with 329 additions and 86 deletions

View File

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