Skip to content

Commit 8366e10

Browse files
author
Jeff Yanta
committed
Fix build with refactor changes to chat protos
1 parent 74852ba commit 8366e10

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
firebase.google.com/go/v4 v4.8.0
77
github.com/aws/aws-sdk-go-v2 v0.17.0
88
github.com/bits-and-blooms/bloom/v3 v3.1.0
9-
github.com/code-payments/code-protobuf-api v1.16.7-0.20240613143759-2e4fbcd11dcb
9+
github.com/code-payments/code-protobuf-api v1.16.7-0.20240617171852-5885f1307f31
1010
github.com/emirpasic/gods v1.12.0
1111
github.com/envoyproxy/protoc-gen-validate v1.0.4
1212
github.com/golang-jwt/jwt/v5 v5.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
121121
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
122122
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
123123
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
124-
github.com/code-payments/code-protobuf-api v1.16.7-0.20240613143759-2e4fbcd11dcb h1:cSgl4rZkQqQ1cDgJFGxyRZFoHljN2Of73znDpqKXftY=
125-
github.com/code-payments/code-protobuf-api v1.16.7-0.20240613143759-2e4fbcd11dcb/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
124+
github.com/code-payments/code-protobuf-api v1.16.7-0.20240617171852-5885f1307f31 h1:nJ2H/SHJipF/tNJns89brkSCrZdkd9M57BqxfTqAr/s=
125+
github.com/code-payments/code-protobuf-api v1.16.7-0.20240617171852-5885f1307f31/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
126126
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 h1:NmTXa/uVnDyp0TY5MKi197+3HWcnYWfnHGyaFthlnGw=
127127
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
128128
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=

pkg/code/data/chat/v2/model.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)