mirror of https://gitlab.com/litecord/litecord.git
fix spawn_embed's app and remove where clauses for conflict row
This commit is contained in:
parent
2086ee2849
commit
fa1151c759
|
|
@ -361,10 +361,10 @@ async def msg_add_attachment(message_id: int, channel_id: int,
|
|||
return attachment_id
|
||||
|
||||
|
||||
async def _spawn_embed(app, payload, **kwargs):
|
||||
app.sched.spawn(
|
||||
async def _spawn_embed(app_, payload, **kwargs):
|
||||
app_.sched.spawn(
|
||||
process_url_embed(
|
||||
app.config, app.storage, app.dispatcher, app.session,
|
||||
app_.config, app_.storage, app_.dispatcher, app_.session,
|
||||
payload, **kwargs)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -297,10 +297,6 @@ async def _process_overwrites(channel_id: int, overwrites: list):
|
|||
DO
|
||||
UPDATE
|
||||
SET allow = $5, deny = $6
|
||||
WHERE channel_overwrites.channel_id = $1
|
||||
AND channel_overwrites.target_type = $2
|
||||
AND channel_overwrites.target_role = $3
|
||||
AND channel_overwrites.target_user = $4
|
||||
""",
|
||||
channel_id, target_type,
|
||||
target_role, target_user,
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ async def process_url_embed(config, storage, dispatcher,
|
|||
if not new_embeds:
|
||||
return
|
||||
|
||||
log.debug('made {} thumbnail embeds for mid {}',
|
||||
log.debug('made {} embeds for mid {}',
|
||||
len(new_embeds), message_id)
|
||||
|
||||
await msg_update_embeds(payload, new_embeds, storage, dispatcher)
|
||||
|
|
|
|||
Loading…
Reference in New Issue