```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-10-12 09:47:35 +05:30
коммит произвёл GitHub
родитель d172ff1881
Коммит 3dd9e3715c
49 изменённых файлов: 12 добавлений и 4727 удалений

Просмотреть файл

@@ -7,7 +7,6 @@ import (
"crypto/sha1"
"encoding/hex"
"encoding/json"
"errors"
"io"
"net/http"
"regexp"
@@ -201,47 +200,6 @@ func WithID(ID string) ChannelOption {
}
}
// The following are some GraphQL methods necessary to return the
// data in float64 type. The spec doesn't support 64 bit integers,
// so we have to pass the data in float64. The _ at the end is
// a hack to keep the attribute name same in GraphQL schema.
func (o *Channel) CreateAt_() float64 {
return float64(o.CreateAt)
}
func (o *Channel) UpdateAt_() float64 {
return float64(o.UpdateAt)
}
func (o *Channel) DeleteAt_() float64 {
return float64(o.DeleteAt)
}
func (o *Channel) LastPostAt_() float64 {
return float64(o.LastPostAt)
}
func (o *Channel) TotalMsgCount_() float64 {
return float64(o.TotalMsgCount)
}
func (o *Channel) TotalMsgCountRoot_() float64 {
return float64(o.TotalMsgCountRoot)
}
func (o *Channel) LastRootPostAt_() float64 {
return float64(o.LastRootPostAt)
}
func (o *Channel) ExtraUpdateAt_() float64 {
return float64(o.ExtraUpdateAt)
}
func (o *Channel) Props_() StringInterface {
return StringInterface(o.Props)
}
func (o *Channel) DeepCopy() *Channel {
cCopy := *o
if cCopy.SchemeId != nil {
@@ -391,24 +349,10 @@ func (o *Channel) GetOtherUserIdForDM(userId string) string {
return otherUserId
}
func (ChannelType) ImplementsGraphQLType(name string) bool {
return name == "ChannelType"
}
func (t ChannelType) MarshalJSON() ([]byte, error) {
return json.Marshal(string(t))
}
func (t *ChannelType) UnmarshalGraphQL(input any) error {
chType, ok := input.(string)
if !ok {
return errors.New("wrong type")
}
*t = ChannelType(chType)
return nil
}
func GetDMNameFromIds(userId1, userId2 string) string {
if userId1 > userId2 {
return userId2 + "__" + userId1