-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Consume PublishedAt irn_subscription property #721
Conversation
…ectSwiftV2 into publishedAt
…V2 into publishedAt
…ectSwiftV2 into publishedAt
let topic: String | ||
let message: String | ||
let publishedAt: Date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to rewrite encoder code?
we can parse it as is, make it private and create computed property:
private let publishedAt: UInt64
var timestamp: Date {
return Date(milliseconds: publishedAt)
}
@@ -19,6 +48,6 @@ struct Subscription: RelayRPC { | |||
} | |||
|
|||
init(id: String, topic: String, message: String) { | |||
self.params = Params(id: id, data: Params.Contents(topic: topic, message: message)) | |||
self.params = Params(id: id, data: Params.Contents(topic: topic, message: message, publishedAt: Date())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this used for tests?
@@ -226,7 +226,7 @@ public final class RelayClient { | |||
try rpcHistory.set(request, forTopic: params.data.topic, emmitedBy: .remote) | |||
logger.debug("topic \(params.data.topic)") | |||
logger.debug("message: \(params.data.message)") | |||
messagePublisherSubject.send((params.data.topic, params.data.message)) | |||
messagePublisherSubject.send((params.data.topic, params.data.message, params.data.publishedAt)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be rename to timestamp? See comment above
Description
Consume
publishedAt
irn_subscription property and pass it into RequestSubscriptionPayload that is published by networking interactorResolves # (issue)
How Has This Been Tested?
Due Dilligence