format changes

This commit is contained in:
ChunkyProgrammer
2025-06-25 23:53:07 -04:00
parent 436f955e0f
commit f8febbe2b2
2 changed files with 8 additions and 8 deletions

View File

@@ -26,9 +26,9 @@ end
def decode_ucid_from_post_protobuf(params)
decoded_protobuf = params.try { |i| URI.decode_www_form(i) }
.try { |i| Base64.decode(i) }
.try { |i| IO::Memory.new(i) }
.try { |i| Protodec::Any.parse(i) }
.try { |i| Base64.decode(i) }
.try { |i| IO::Memory.new(i) }
.try { |i| Protodec::Any.parse(i) }
return decoded_protobuf.try(&.["56:0:embedded"]["2:0:string"].as_s)
end
@@ -36,10 +36,10 @@ end
def fetch_channel_community_post(ucid, post_id, locale, format, thin_mode)
object = {
"56:embedded" => {
"2:string" => ucid,
"3:string" => post_id.to_s,
"2:string" => ucid,
"3:string" => post_id.to_s,
"11:string" => ucid,
}
},
}
params = object.try { |i| Protodec::Any.cast_json(i) }
.try { |i| Protodec::Any.from_json(i) }