PageSourceSearch

https://farcaster.xyz/assets/casts-DIbT8ZMJ.js

js farcaster.xyz collected 2026-09-24 08:33:30 UTC 2,274 bytes, 1 lines download raw bytes

1import{r as v}from"./vendor-wagmi-CRHMQcRy.js";import{$ as p,cy as f,ch as y,cz as m}from"./index-CjDX1y09.js";import{u as I,a as M,b as D,c as x}from"./SearchForDirectCastTargets-ePQ49shG.js";function w(t){return{conversationId:t.conversationId,type:t.type,message:t.message,messageId:t.messageId,reactions:[],senderFid:t.fid,serverTimestamp:Date.now(),metadata:t.optimisticMetadata,inReplyTo:t.optimisticInReplyTo,hasMention:!1,isPinned:!1,isDeleted:!1,viewerContext:{focused:!1,isLastReadMessage:!0,reactions:[],isOptimistic:!0},senderContext:t.senderContext,actionTargetUserContext:t.actionTakenUserContext}}const A=()=>{const{apiClient:t}=p(),a=f(),i=I(),o=M(),r=y(),c=D(),d=x();return v.useCallback(async({data:e,onOptimisticUpdate:u=()=>{},onSuccess:C=()=>{},onError:l=()=>{}})=>{const n=w(e);a({message:n}),r({updates:{conversationId:e.conversationId,lastMessage:n,selfLastReadTime:Date.now(),viewerContext:{lastReadAt:Date.now(),unreadCount:0,unreadMentionsCount:0,unreadReactionMessage:void 0,manuallyMarkedUnread:!1}}}),i({updates:{conversationId:e.conversationId,lastMessage:n,viewerContext:{lastReadAt:Date.now(),unreadCount:0,unreadMentionsCount:0,unreadReactionMessage:void 0,manuallyMarkedUnread:!1}}});const g=c({fid:e.fid,conversationId:e.conversationId,category:e.conversationCategory});if(o({fid:e.fid,category:e.conversationCategory,updates:{conversationId:e.conversationId,lastMessage:n,viewerContext:{lastReadAt:Date.now(),unreadCount:0,unreadMentionsCount:0,unreadReactionMessage:void 0,manuallyMarkedUnread:!1}}}),typeof e.conversationCategory>"u"||e.conversationCategory!=="default")try{await d({fid:e.fid,fromCategory:e.conversationCategory,toCategory:"default",conversationId:e.conversationId})}catch(s){if(m(s)&&s.status!==404)throw s}u(n);try{const{data:s}=await t.putDirectCastV3({conversationId:e.conversationId,recipientFids:e.recipientFids,messageId:e.messageId,type:e.type,message:e.message,inReplyToId:e.optimisticInReplyTo?.messageId,clientProcessedMetadata:e.optimisticMetadata});return C(),{data:s,error:void 0}}catch(s){return o({fid:e.fid,category:e.conversationCategory,updates:{conversationId:e.conversationId,lastMessage:g?.conversation?.lastMessage}}),l(s),{data:void 0,error:s}}},[d,t,a,o,i,c,r])},h=1024;export{h as M,A as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.