From aa916965d0605f640dc99207c3e2124c18585f89 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 14 Jan 2019 09:34:40 -0500 Subject: [PATCH] Update protos to reflect link previews. --- Scripts/ProtoWrappers.py | 4 ++++ SignalServiceKit/src/Protos/Generated/SSKProto.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Scripts/ProtoWrappers.py b/Scripts/ProtoWrappers.py index c35bbbe30..b2838cba9 100755 --- a/Scripts/ProtoWrappers.py +++ b/Scripts/ProtoWrappers.py @@ -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): diff --git a/SignalServiceKit/src/Protos/Generated/SSKProto.swift b/SignalServiceKit/src/Protos/Generated/SSKProto.swift index 966bd22e3..9af1d765f 100644 --- a/SignalServiceKit/src/Protos/Generated/SSKProto.swift +++ b/SignalServiceKit/src/Protos/Generated/SSKProto.swift @@ -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