package com.discord.utilities.rest; import com.discord.api.channel.Channel; import com.discord.models.user.User; import j0.k.b; import j0.l.a.q; import java.util.List; import rx.Observable; /* compiled from: RestAPI.kt */ public final class RestAPI$addGroupRecipients$3 implements b> { public final /* synthetic */ long $channelId; public final /* synthetic */ List $recipients; public final /* synthetic */ RestAPI this$0; /* compiled from: RestAPI.kt */ /* renamed from: com.discord.utilities.rest.RestAPI$addGroupRecipients$3$1 reason: invalid class name */ public static final class AnonymousClass1 implements b> { public final /* synthetic */ Channel $channel; public final /* synthetic */ RestAPI$addGroupRecipients$3 this$0; public AnonymousClass1(RestAPI$addGroupRecipients$3 restAPI$addGroupRecipients$3, Channel channel) { this.this$0 = restAPI$addGroupRecipients$3; this.$channel = channel; } public final Observable call(User user) { return RestAPI.access$get_api$p(this.this$0.this$0).addChannelRecipient(this.$channel.h(), user.getId()); } } /* compiled from: RestAPI.kt */ /* renamed from: com.discord.utilities.rest.RestAPI$addGroupRecipients$3$2 reason: invalid class name */ public static final class AnonymousClass2 implements b>, Observable> { public final /* synthetic */ Channel $channel; /* compiled from: RestAPI.kt */ /* renamed from: com.discord.utilities.rest.RestAPI$addGroupRecipients$3$2$1 reason: invalid class name */ public static final class AnonymousClass1 implements b, Channel> { public final /* synthetic */ AnonymousClass2 this$0; public AnonymousClass1(AnonymousClass2 r1) { this.this$0 = r1; } public final Channel call(List list) { return this.this$0.$channel; } } public AnonymousClass2(Channel channel) { this.$channel = channel; } public final Observable call(List> list) { return Observable.G(Observable.h0(new q(list))).f0().F(new AnonymousClass1(this)); } } public RestAPI$addGroupRecipients$3(RestAPI restAPI, long j, List list) { this.this$0 = restAPI; this.$channelId = j; this.$recipients = list; } public final Observable call(Channel channel) { List list; if (channel.h() == this.$channelId) { list = this.$recipients; } else { List list2 = this.$recipients; list = list2.subList(1, list2.size()); } return Observable.A(list).F(new AnonymousClass1(this, channel)).f0().Y(new AnonymousClass2(channel)); } }