Ok, So I'm trying to add in GetStream to an application which will allow users to comment. Firstly struggling to understand the "backwards" grammar of the documentation I'm also struggling to get a method working correctly (This is down to bad documentation) as all I'm trying to do is check if a user is following a specific feed:
userFeed!.following(filter: [FeedId(feedSlug: "element", userId: uuid)], limit: 1) { result in}
The above fails with the following reason:
Cannot convert return expression of type 'Cancellable' to return type 'Bool'
This is a snippet from their own docs:
user1.following(filter: [FeedId(feedSlug: "user", userId: "42"),
FeedId(feedSlug: "user", userId: "43")], limit: 2) { result in /* ... */ }
Has anyone worked with GetStream who can help with this?
Thanks
userFeed = Client.shared.flatFeed(feedSlug: "user", userId: "\(user.id)")- user7684436userId: "\(user.id)". It always should be the current user id. So, how it's possible that you getBoolwhere thefollowingreturns discardableCancellable? Can you confirm you store user feed as an instance variable? - buhuser.idis an assigned value outside of GetStream and our own id value. But I can remove for brevity. Unknown how Cancellable is declaring itself a Bool, perhaps it defaults toisCancelled, Managed to address this issue by providing the ending method to the block - `{ result in }.cancel() - Whether this will result in it not checking is for another thread. The documentation could do with thickening out on these things - user7684436Optional(FeedConfigException[6] Status Code: 400, "d22bff18-e6f4-4ffc-a4fe-9bbcf5f086ac" is not a valid feed group)- user7684436