mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
style: Take an optional context instead of deconstructed parameters
This commit is contained in:
15 files changed
+46
-100
No files matched your search
@@ -91,15 +91,7 @@ async fn load_timeline(
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1
|
||||
.set_unsigned(
|
||||
ctx.user_id,
|
||||
ctx.membership,
|
||||
ctx.prev_content,
|
||||
ctx.redacted_because,
|
||||
)
|
||||
.log_err()
|
||||
.ok();
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
Some(pdu)
|
||||
})
|
||||
.then(async move |mut pdu| {
|
||||
@@ -129,15 +121,7 @@ async fn load_timeline(
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu.1, Some(sender_user))
|
||||
.await;
|
||||
pdu.1
|
||||
.set_unsigned(
|
||||
ctx.user_id,
|
||||
ctx.membership,
|
||||
ctx.prev_content,
|
||||
ctx.redacted_because,
|
||||
)
|
||||
.log_err()
|
||||
.ok();
|
||||
pdu.1.set_unsigned(Some(ctx)).log_err().ok();
|
||||
Some(pdu)
|
||||
})
|
||||
.then(async move |mut pdu| {
|
||||
|
||||
@@ -328,9 +328,7 @@ async fn build_sticky_events(
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu, Some(sync_context.syncing_user))
|
||||
.await;
|
||||
pdu.set_unsigned(ctx.user_id, ctx.membership, ctx.prev_content, ctx.redacted_because)
|
||||
.log_err()
|
||||
.ok();
|
||||
pdu.set_unsigned(Some(ctx)).log_err().ok();
|
||||
events.push(Event::into_format(pdu));
|
||||
}
|
||||
|
||||
|
||||
@@ -1218,9 +1218,7 @@ async fn push_sticky_event(
|
||||
.timeline
|
||||
.get_unsigned_context(&pdu, Some(sender_user))
|
||||
.await;
|
||||
pdu.set_unsigned(ctx.user_id, ctx.membership, ctx.prev_content, ctx.redacted_because)
|
||||
.log_err()
|
||||
.ok();
|
||||
pdu.set_unsigned(Some(ctx)).log_err().ok();
|
||||
response
|
||||
.rooms
|
||||
.entry(room_id)
|
||||
|
||||
Reference in new issue
Block a user