mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[store] hide nsfw content behind spoiler
This commit is contained in:
@@ -45,7 +45,8 @@ public abstract class AbstractKittiesService : IRandomMediaService
|
||||
|
||||
return new RandomMedia(
|
||||
new InputFile(await response.Content.ReadAsStreamAsync()),
|
||||
new HtmlString().Url(videoSource, videoTitle).ToString()
|
||||
new HtmlString().Url(videoSource, videoTitle).ToString(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,13 @@ public class AnimBoobsService : IRandomMediaService
|
||||
public async Task<RandomMedia> GetRandomMediaAsync()
|
||||
{
|
||||
var fileName = await _httpClient.GetStringAsync("index.php");
|
||||
return new RandomMedia(new InputFileUrl($"https://westdev.me/_boobs/media/{fileName}"))
|
||||
// https://bugs.telegram.org/c/23674 workaround
|
||||
var video = await _httpClient.GetStreamAsync($"https://westdev.me/_boobs/media/{fileName}");
|
||||
|
||||
return new RandomMedia(new InputFile(video, fileName))
|
||||
{
|
||||
Type = InputMediaType.Video
|
||||
Type = InputMediaType.Video,
|
||||
Nsfw = true
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class OBoobsService : IRandomMediaService
|
||||
var boobsItem = boobsResponse![0];
|
||||
var boobsId = boobsItem.Id.ToString("D5");
|
||||
|
||||
return new RandomMedia(new InputFileUrl($"https://media.oboobs.ru/boobs/{boobsId}.jpg"), boobsItem.Model);
|
||||
return new RandomMedia(new InputFileUrl($"https://media.oboobs.ru/boobs/{boobsId}.jpg"), boobsItem.Model, true);
|
||||
}
|
||||
|
||||
public async Task<bool> CanView(Chat chat, User user)
|
||||
|
||||
Reference in New Issue
Block a user