MCPcopy
hub / github.com/tinode/chat / pbTopicSerializeToDesc

Function pbTopicSerializeToDesc

server/pbconverter.go:937–953  ·  view source on GitHub ↗
(topic *Topic)

Source from the content-addressed store, hash-verified

935}
936
937func pbTopicSerializeToDesc(topic *Topic) *pbx.TopicDesc {
938 if topic == nil {
939 return nil
940 }
941 return &pbx.TopicDesc{
942 CreatedAt: timeToInt64(&topic.created),
943 UpdatedAt: timeToInt64(&topic.updated),
944 Defacs: &pbx.DefaultAcsMode{
945 Auth: topic.accessAuth.String(),
946 Anon: topic.accessAnon.String(),
947 },
948 SeqId: int32(topic.lastID),
949 DelId: int32(topic.delID),
950 Public: interfaceToBytes(topic.public),
951 Trusted: interfaceToBytes(topic.trusted),
952 }
953}
954
955func pbTopicSubSliceSerialize(subs []MsgTopicSub) []*pbx.TopicSub {
956 if len(subs) == 0 {

Callers 1

pluginTopicFunction · 0.85

Calls 3

timeToInt64Function · 0.85
interfaceToBytesFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…