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

Function pbSetQueryDeserialize

server/pbconverter.go:703–746  ·  view source on GitHub ↗
(in *pbx.SetQuery)

Source from the content-addressed store, hash-verified

701}
702
703func pbSetQueryDeserialize(in *pbx.SetQuery) *MsgSetQuery {
704 if in == nil {
705 return nil
706 }
707
708 var msg *MsgSetQuery
709
710 if desc := in.GetDesc(); desc != nil {
711 msg = &MsgSetQuery{}
712 msg.Desc = pbSetDescDeserialize(desc)
713 }
714
715 if sub := in.GetSub(); sub != nil {
716 user := sub.GetUserId()
717 mode := sub.GetMode()
718
719 if user != "" || mode != "" {
720 if msg == nil {
721 msg = &MsgSetQuery{}
722 }
723
724 msg.Sub = &MsgSetSub{
725 User: sub.GetUserId(),
726 Mode: sub.GetMode(),
727 }
728 }
729 }
730
731 if tags := in.GetTags(); tags != nil {
732 if msg == nil {
733 msg = &MsgSetQuery{}
734 }
735 msg.Tags = tags
736 }
737
738 if cred := in.GetCred(); cred != nil {
739 if msg == nil {
740 msg = &MsgSetQuery{}
741 }
742 msg.Cred = pbClientCredDeserialize(cred)
743 }
744
745 return msg
746}
747
748func pbInfoNoteWhatSerialize(what string) pbx.InfoNote {
749 var out pbx.InfoNote

Callers 1

pbCliDeserializeFunction · 0.85

Calls 8

pbSetDescDeserializeFunction · 0.85
pbClientCredDeserializeFunction · 0.85
GetDescMethod · 0.45
GetSubMethod · 0.45
GetUserIdMethod · 0.45
GetModeMethod · 0.45
GetTagsMethod · 0.45
GetCredMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…