@@ -114,26 +114,26 @@ func (a MessagesByMessageId) Less(i, j int) bool {
114114}
115115
116116// GetChatTypeFromProto gets a chat type from the protobuf variant
117- func GetChatTypeFromProto (proto chatpb.ChatMetadata_Kind ) ChatType {
117+ func GetChatTypeFromProto (proto chatpb.ChatType ) ChatType {
118118 switch proto {
119- case chatpb .ChatMetadata_NOTIFICATION :
119+ case chatpb .ChatType_NOTIFICATION :
120120 return ChatTypeNotification
121- case chatpb .ChatMetadata_TWO_WAY :
121+ case chatpb .ChatType_TWO_WAY :
122122 return ChatTypeTwoWay
123123 default :
124124 return ChatTypeUnknown
125125 }
126126}
127127
128128// ToProto returns the proto representation of the chat type
129- func (c ChatType ) ToProto () chatpb.ChatMetadata_Kind {
129+ func (c ChatType ) ToProto () chatpb.ChatType {
130130 switch c {
131131 case ChatTypeNotification :
132- return chatpb .ChatMetadata_NOTIFICATION
132+ return chatpb .ChatType_NOTIFICATION
133133 case ChatTypeTwoWay :
134- return chatpb .ChatMetadata_TWO_WAY
134+ return chatpb .ChatType_TWO_WAY
135135 default :
136- return chatpb .ChatMetadata_UNKNOWN
136+ return chatpb .ChatType_UNKNOWN_CHAT_TYPE
137137 }
138138}
139139
@@ -150,30 +150,30 @@ func (c ChatType) String() string {
150150}
151151
152152// GetPointerTypeFromProto gets a chat ID from the protobuf variant
153- func GetPointerTypeFromProto (proto chatpb.Pointer_Kind ) PointerType {
153+ func GetPointerTypeFromProto (proto chatpb.PointerType ) PointerType {
154154 switch proto {
155- case chatpb .Pointer_SENT :
155+ case chatpb .PointerType_SENT :
156156 return PointerTypeSent
157- case chatpb .Pointer_DELIVERED :
157+ case chatpb .PointerType_DELIVERED :
158158 return PointerTypeDelivered
159- case chatpb .Pointer_READ :
159+ case chatpb .PointerType_READ :
160160 return PointerTypeRead
161161 default :
162162 return PointerTypeUnknown
163163 }
164164}
165165
166166// ToProto returns the proto representation of the pointer type
167- func (p PointerType ) ToProto () chatpb.Pointer_Kind {
167+ func (p PointerType ) ToProto () chatpb.PointerType {
168168 switch p {
169169 case PointerTypeSent :
170- return chatpb .Pointer_SENT
170+ return chatpb .PointerType_SENT
171171 case PointerTypeDelivered :
172- return chatpb .Pointer_DELIVERED
172+ return chatpb .PointerType_DELIVERED
173173 case PointerTypeRead :
174- return chatpb .Pointer_READ
174+ return chatpb .PointerType_READ
175175 default :
176- return chatpb .Pointer_UNKNOWN
176+ return chatpb .PointerType_UNKNOWN_POINTER_TYPE
177177 }
178178}
179179
0 commit comments