another.im-ios/AnotherXMPP/modules/presence/PresenceModule.swift
2025-01-14 03:52:20 +01:00

32 lines
821 B
Swift

import Foundation
// NSString* const kSubBoth = @"both";
// NSString* const kSubNone = @"none";
// NSString* const kSubTo = @"to";
// NSString* const kSubFrom = @"from";
// NSString* const kSubRemove = @"remove";
// NSString* const kAskSubscribe = @"subscribe";
// TODO: Cancel subscr. request when contact deleted from roster
// Update when server sends roster push also
final class PresenceModule: XmppModule {
let id = "Presence module"
func reduce(oldState: ClientState, with _: Event) -> ClientState {
oldState
}
func process(state _: ClientState, with event: Event) async -> Event? {
switch event {
case .rosterRequestDone:
return nil
case .stanzaInbound(let stanza):
return nil
default:
return nil
}
}
}