Dan
Dan

Reputation: 69

Deep-link directly into a specific chat or message?

This is for iOS: What method do you recommend for deep-linking directly into a specific chat or message from elsewhere in an app, when I have a channel-id and/or a message-id?

Upvotes: 1

Views: 620

Answers (1)

bonc
bonc

Reputation: 152

We recommend using query functions to fetch messages/channels by their id.

// Fetch a channel by id
let query = ChannelsQuery(filter: .key("id", .equal(to: "channel-id")))
Client.shared.channels(query: query).subscribe(onNext: { (response) in
    // handle response
}).disposed(by: disposeBag)

// Fetch a message by id
Client.shared.message(with: "message-id").subscribe(onNext: { (response) in
    // handle response
}).disposed(by: disposeBag)

Soon we'll release 2.0, which will have support for usual callback-way.

Upvotes: 2

Related Questions