Skip to content

Commit 12fd7e1

Browse files
committed
use proper swift naming convention for Id/ID
1 parent b9edb32 commit 12fd7e1

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

ElementX/Sources/Services/ElementCall/ElementCallService.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ class ElementCallService: NSObject, ElementCallServiceProtocol, PKPushRegistryDe
372372
return
373373
}
374374

375-
guard let rtcNotificationId = incomingCallID.rtcNotificationId else {
375+
guard let rtcNotificationID = incomingCallID.rtcNotificationID else {
376376
MXLog.warning("Decline: No RTC notification ID found for the incoming call.")
377377
return
378378
}
@@ -383,10 +383,10 @@ class ElementCallService: NSObject, ElementCallServiceProtocol, PKPushRegistryDe
383383
}
384384
let ownUserId = clientProxy.userID
385385

386-
MXLog.info("Observe decline events for notification \(rtcNotificationId)")
386+
MXLog.info("Observe decline events for notification \(rtcNotificationID)")
387387

388388
declineListenerCancellable = roomProxy
389-
.callDeclineEventPublisher(notificationId: rtcNotificationId)
389+
.callDeclineEventPublisher(notificationId: rtcNotificationID)
390390
.sink { ev in
391391
MXLog.debug("Call declined event received from \(ev.sender)")
392392
if ev.sender == ownUserId {

ElementX/Sources/Services/Room/JoinedRoomProxy.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -650,14 +650,14 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
650650
}
651651

652652
/// Subscribe to call decline events from that rtc notification event.
653-
func callDeclineEventPublisher(notificationId rtcNotificationEventId: String) -> AnyPublisher<RtcDeclinedEvent, Never> {
654-
let publisher = DeclineCallbackPublisher(room: self, eventId: rtcNotificationEventId)
653+
func callDeclineEventPublisher(notificationId rtcNotificationEventID: String) -> AnyPublisher<RtcDeclinedEvent, Never> {
654+
let publisher = DeclineCallbackPublisher(room: self, eventID: rtcNotificationEventID)
655655
return publisher.eraseToAnyPublisher()
656656
}
657657

658-
func subscribeToCallDeclineEvents(rtcNotificationEventId: String, listener: RoomCallDeclineListener) -> Result<TaskHandle, RoomProxyError> {
658+
func subscribeToCallDeclineEvents(rtcNotificationEventID: String, listener: RoomCallDeclineListener) -> Result<TaskHandle, RoomProxyError> {
659659
do {
660-
let handle = try room.subscribeToCallDeclineEvents(rtcNotificationEventId: rtcNotificationEventId, listener: listener)
660+
let handle = try room.subscribeToCallDeclineEvents(rtcNotificationEventId: rtcNotificationEventID, listener: listener)
661661
return .success(handle)
662662
} catch {
663663
MXLog.error("Failed observing rtc decline with error: \(error)")
@@ -834,15 +834,15 @@ private final class RoomKnockRequestsListener: KnockRequestsListener {
834834

835835
final class RoomCallDeclineListener: CallDeclineListener {
836836
private let onUpdateClosure: (RtcDeclinedEvent) -> Void
837-
private let notificationId: String
837+
private let notificationID: String
838838

839-
init(notificationId: String, onUpdateClosure: @escaping (RtcDeclinedEvent) -> Void) {
840-
self.notificationId = notificationId
839+
init(notificationID: String, onUpdateClosure: @escaping (RtcDeclinedEvent) -> Void) {
840+
self.notificationID = notificationID
841841
self.onUpdateClosure = onUpdateClosure
842842
}
843843

844844
func call(declinerUserId: String) {
845-
onUpdateClosure(.init(sender: declinerUserId, notificationEventId: notificationId))
845+
onUpdateClosure(.init(sender: declinerUserId, notificationEventID: notificationID))
846846
}
847847
}
848848

@@ -852,10 +852,10 @@ struct DeclineCallbackPublisher: Publisher {
852852
typealias Failure = Never
853853

854854
let room: JoinedRoomProxy
855-
let eventId: String
855+
let eventID: String
856856

857857
func receive<S>(subscriber: S) where S: Subscriber, Never == S.Failure, RtcDeclinedEvent == S.Input {
858-
let subscription = Inner(subscriber: subscriber, room: room, eventId: eventId)
858+
let subscription = Inner(subscriber: subscriber, room: room, eventID: eventID)
859859
subscriber.receive(subscription: subscription)
860860
}
861861

@@ -865,12 +865,12 @@ struct DeclineCallbackPublisher: Publisher {
865865
private var handle: TaskHandle?
866866
private var listener: RoomCallDeclineListener?
867867

868-
init(subscriber: S, room: JoinedRoomProxy, eventId: String) {
868+
init(subscriber: S, room: JoinedRoomProxy, eventID: String) {
869869
self.subscriber = subscriber
870-
listener = RoomCallDeclineListener(notificationId: eventId) { [weak self] ev in
870+
listener = RoomCallDeclineListener(notificationID: eventID) { [weak self] ev in
871871
_ = self?.subscriber?.receive(ev)
872872
}
873-
handle = try? room.subscribeToCallDeclineEvents(rtcNotificationEventId: eventId, listener: listener!).get()
873+
handle = try? room.subscribeToCallDeclineEvents(rtcNotificationEventID: eventID, listener: listener!).get()
874874
}
875875

876876
func request(_ demand: Subscribers.Demand) {

ElementX/Sources/Services/Room/RoomProxyProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct RtcDeclinedEvent {
6868
/// The sender of the decline event
6969
let sender: String
7070
/// The rtc.notification event that is beeing declined
71-
let notificationEventId: String
71+
let notificationEventID: String
7272
}
7373

7474
// sourcery: AutoMockable

0 commit comments

Comments
 (0)