Update protos to reflect link previews.

This commit is contained in:
Matthew Chen 2019-01-14 09:34:40 -05:00
parent 5a529567aa
commit aa916965d0
2 changed files with 5 additions and 1 deletions

View File

@ -356,6 +356,10 @@ class MessageField:
# TODO: I'm not sure why "Apple Swift Proto" code formats the
# the name in this way.
name = 'hasID'
elif name == 'hasUrl':
# TODO: I'm not sure why "Apple Swift Proto" code formats the
# the name in this way.
name = 'hasURL'
return name
class MessageContext(BaseContext):

View File

@ -2763,7 +2763,7 @@ extension SSKProtoDataMessageContact.SSKProtoDataMessageContactBuilder {
}
fileprivate class func parseProto(_ proto: SignalServiceProtos_DataMessage.Preview) throws -> SSKProtoDataMessagePreview {
guard proto.hasUrl else {
guard proto.hasURL else {
throw SSKProtoError.invalidProtobuf(description: "\(logTag) missing required field: url")
}
let url = proto.url