Update proto schema for configuration messages to reflect typing indicators setting.

pull/1/head
Matthew Chen 7 years ago
parent 6b1b2ddae2
commit 33f5398ba8

@ -296,8 +296,9 @@ message SyncMessage {
} }
message Configuration { message Configuration {
optional bool readReceipts = 1; optional bool readReceipts = 1;
optional bool unidentifiedDeliveryIndicators = 2; optional bool unidentifiedDeliveryIndicators = 2;
optional bool typingIndicators = 3;
} }
optional Sent sent = 1; optional Sent sent = 1;

@ -4154,6 +4154,9 @@ extension SSKProtoSyncMessageRead.SSKProtoSyncMessageReadBuilder {
if hasUnidentifiedDeliveryIndicators { if hasUnidentifiedDeliveryIndicators {
builder.setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators) builder.setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators)
} }
if hasTypingIndicators {
builder.setTypingIndicators(typingIndicators)
}
return builder return builder
} }
@ -4171,6 +4174,10 @@ extension SSKProtoSyncMessageRead.SSKProtoSyncMessageReadBuilder {
proto.unidentifiedDeliveryIndicators = valueParam proto.unidentifiedDeliveryIndicators = valueParam
} }
@objc public func setTypingIndicators(_ valueParam: Bool) {
proto.typingIndicators = valueParam
}
@objc public func build() throws -> SSKProtoSyncMessageConfiguration { @objc public func build() throws -> SSKProtoSyncMessageConfiguration {
return try SSKProtoSyncMessageConfiguration.parseProto(proto) return try SSKProtoSyncMessageConfiguration.parseProto(proto)
} }
@ -4196,6 +4203,13 @@ extension SSKProtoSyncMessageRead.SSKProtoSyncMessageReadBuilder {
return proto.hasUnidentifiedDeliveryIndicators return proto.hasUnidentifiedDeliveryIndicators
} }
@objc public var typingIndicators: Bool {
return proto.typingIndicators
}
@objc public var hasTypingIndicators: Bool {
return proto.hasTypingIndicators
}
private init(proto: SignalServiceProtos_SyncMessage.Configuration) { private init(proto: SignalServiceProtos_SyncMessage.Configuration) {
self.proto = proto self.proto = proto
} }

@ -1741,12 +1741,22 @@ struct SignalServiceProtos_SyncMessage {
/// Clears the value of `unidentifiedDeliveryIndicators`. Subsequent reads from it will return its default value. /// Clears the value of `unidentifiedDeliveryIndicators`. Subsequent reads from it will return its default value.
mutating func clearUnidentifiedDeliveryIndicators() {self._unidentifiedDeliveryIndicators = nil} mutating func clearUnidentifiedDeliveryIndicators() {self._unidentifiedDeliveryIndicators = nil}
var typingIndicators: Bool {
get {return _typingIndicators ?? false}
set {_typingIndicators = newValue}
}
/// Returns true if `typingIndicators` has been explicitly set.
var hasTypingIndicators: Bool {return self._typingIndicators != nil}
/// Clears the value of `typingIndicators`. Subsequent reads from it will return its default value.
mutating func clearTypingIndicators() {self._typingIndicators = nil}
var unknownFields = SwiftProtobuf.UnknownStorage() var unknownFields = SwiftProtobuf.UnknownStorage()
init() {} init() {}
fileprivate var _readReceipts: Bool? = nil fileprivate var _readReceipts: Bool? = nil
fileprivate var _unidentifiedDeliveryIndicators: Bool? = nil fileprivate var _unidentifiedDeliveryIndicators: Bool? = nil
fileprivate var _typingIndicators: Bool? = nil
} }
init() {} init() {}
@ -4048,6 +4058,7 @@ extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message,
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "readReceipts"), 1: .same(proto: "readReceipts"),
2: .same(proto: "unidentifiedDeliveryIndicators"), 2: .same(proto: "unidentifiedDeliveryIndicators"),
3: .same(proto: "typingIndicators"),
] ]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -4055,6 +4066,7 @@ extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message,
switch fieldNumber { switch fieldNumber {
case 1: try decoder.decodeSingularBoolField(value: &self._readReceipts) case 1: try decoder.decodeSingularBoolField(value: &self._readReceipts)
case 2: try decoder.decodeSingularBoolField(value: &self._unidentifiedDeliveryIndicators) case 2: try decoder.decodeSingularBoolField(value: &self._unidentifiedDeliveryIndicators)
case 3: try decoder.decodeSingularBoolField(value: &self._typingIndicators)
default: break default: break
} }
} }
@ -4067,12 +4079,16 @@ extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message,
if let v = self._unidentifiedDeliveryIndicators { if let v = self._unidentifiedDeliveryIndicators {
try visitor.visitSingularBoolField(value: v, fieldNumber: 2) try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
} }
if let v = self._typingIndicators {
try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
}
try unknownFields.traverse(visitor: &visitor) try unknownFields.traverse(visitor: &visitor)
} }
static func ==(lhs: SignalServiceProtos_SyncMessage.Configuration, rhs: SignalServiceProtos_SyncMessage.Configuration) -> Bool { static func ==(lhs: SignalServiceProtos_SyncMessage.Configuration, rhs: SignalServiceProtos_SyncMessage.Configuration) -> Bool {
if lhs._readReceipts != rhs._readReceipts {return false} if lhs._readReceipts != rhs._readReceipts {return false}
if lhs._unidentifiedDeliveryIndicators != rhs._unidentifiedDeliveryIndicators {return false} if lhs._unidentifiedDeliveryIndicators != rhs._unidentifiedDeliveryIndicators {return false}
if lhs._typingIndicators != rhs._typingIndicators {return false}
if lhs.unknownFields != rhs.unknownFields {return false} if lhs.unknownFields != rhs.unknownFields {return false}
return true return true
} }

Loading…
Cancel
Save