mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00:29 +05:30
Allow Avatar URL to change in channel.
This commit is contained in:
parent
d18a019640
commit
86154a1a29
@ -24,7 +24,7 @@ public class CustomServletDecorator implements AsyncServlet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Promisable<HttpResponse> serve(@NotNull HttpRequest request) {
|
||||
public @NotNull Promisable<HttpResponse> serve(@NotNull HttpRequest request) throws Exception {
|
||||
long before = System.nanoTime();
|
||||
return servlet.serve(request).promise().map(response -> {
|
||||
|
||||
|
@ -218,8 +218,10 @@ public class ResponseHelper {
|
||||
me.kavin.piped.utils.obj.db.Channel channel = DatabaseHelper.getChannelFromId(s, info.getId());
|
||||
|
||||
if (channel != null) {
|
||||
if (channel.isVerified() != info.isVerified()) {
|
||||
if (channel.isVerified() != info.isVerified()
|
||||
|| !channel.getUploaderAvatar().equals(info.getAvatarUrl())) {
|
||||
channel.setVerified(info.isVerified());
|
||||
channel.setUploaderAvatar(info.getAvatarUrl());
|
||||
if (!s.getTransaction().isActive())
|
||||
s.getTransaction().begin();
|
||||
s.update(channel);
|
||||
|
Loading…
Reference in New Issue
Block a user