@@ -53,15 +53,15 @@ func (n *NotifyRouterActivityRouter) kuid(uid gregor1.UID) keybase1.UID {
5353func (n * NotifyRouterActivityRouter ) Activity (ctx context.Context , uid gregor1.UID ,
5454 topicType chat1.TopicType , activity * chat1.ChatActivity , source chat1.ChatActivitySource ) {
5555 defer n .Trace (ctx , func () error { return nil }, "Activity(%v,%v)" , topicType , source )()
56- ctx = BackgroundContext (ctx , n .G ())
56+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
5757 n .notifyCh <- func () {
5858 n .G ().NotifyRouter .HandleNewChatActivity (ctx , n .kuid (uid ), topicType , activity , source )
5959 }
6060}
6161
6262func (n * NotifyRouterActivityRouter ) TypingUpdate (ctx context.Context , updates []chat1.ConvTypingUpdate ) {
6363 defer n .Trace (ctx , func () error { return nil }, "TypingUpdate" )()
64- ctx = BackgroundContext (ctx , n .G ())
64+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
6565 n .notifyCh <- func () {
6666 n .G ().NotifyRouter .HandleChatTypingUpdate (ctx , updates )
6767 }
@@ -70,7 +70,7 @@ func (n *NotifyRouterActivityRouter) TypingUpdate(ctx context.Context, updates [
7070func (n * NotifyRouterActivityRouter ) JoinedConversation (ctx context.Context , uid gregor1.UID ,
7171 convID chat1.ConversationID , topicType chat1.TopicType , conv * chat1.InboxUIItem ) {
7272 defer n .Trace (ctx , func () error { return nil }, "JoinedConversation(%s,%v)" , convID , topicType )()
73- ctx = BackgroundContext (ctx , n .G ())
73+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
7474 n .notifyCh <- func () {
7575 n .G ().NotifyRouter .HandleChatJoinedConversation (ctx , n .kuid (uid ), convID , topicType , conv )
7676 }
@@ -79,7 +79,7 @@ func (n *NotifyRouterActivityRouter) JoinedConversation(ctx context.Context, uid
7979func (n * NotifyRouterActivityRouter ) LeftConversation (ctx context.Context , uid gregor1.UID ,
8080 convID chat1.ConversationID , topicType chat1.TopicType ) {
8181 defer n .Trace (ctx , func () error { return nil }, "LeftConversation(%s,%v)" , convID , topicType )()
82- ctx = BackgroundContext (ctx , n .G ())
82+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
8383 n .notifyCh <- func () {
8484 n .G ().NotifyRouter .HandleChatLeftConversation (ctx , n .kuid (uid ), convID , topicType )
8585 }
@@ -88,7 +88,7 @@ func (n *NotifyRouterActivityRouter) LeftConversation(ctx context.Context, uid g
8888func (n * NotifyRouterActivityRouter ) ResetConversation (ctx context.Context , uid gregor1.UID ,
8989 convID chat1.ConversationID , topicType chat1.TopicType ) {
9090 defer n .Trace (ctx , func () error { return nil }, "ResetConversation(%s,%v)" , convID , topicType )()
91- ctx = BackgroundContext (ctx , n .G ())
91+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
9292 n .notifyCh <- func () {
9393 n .G ().NotifyRouter .HandleChatResetConversation (ctx , n .kuid (uid ), convID , topicType )
9494 }
@@ -97,7 +97,7 @@ func (n *NotifyRouterActivityRouter) ResetConversation(ctx context.Context, uid
9797func (n * NotifyRouterActivityRouter ) KBFSToImpteamUpgrade (ctx context.Context , uid gregor1.UID ,
9898 convID chat1.ConversationID , topicType chat1.TopicType ) {
9999 defer n .Trace (ctx , func () error { return nil }, "KBFSToImpteamUpgrade(%s,%v)" , convID , topicType )()
100- ctx = BackgroundContext (ctx , n .G ())
100+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
101101 n .notifyCh <- func () {
102102 n .G ().NotifyRouter .HandleChatKBFSToImpteamUpgrade (ctx , n .kuid (uid ), convID , topicType )
103103 }
@@ -106,7 +106,7 @@ func (n *NotifyRouterActivityRouter) KBFSToImpteamUpgrade(ctx context.Context, u
106106func (n * NotifyRouterActivityRouter ) SetConvRetention (ctx context.Context , uid gregor1.UID ,
107107 convID chat1.ConversationID , topicType chat1.TopicType , conv * chat1.InboxUIItem ) {
108108 defer n .Trace (ctx , func () error { return nil }, "SetConvRetention(%s,%v)" , convID , topicType )()
109- ctx = BackgroundContext (ctx , n .G ())
109+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
110110 n .notifyCh <- func () {
111111 n .G ().NotifyRouter .HandleChatSetConvRetention (ctx , n .kuid (uid ), convID , topicType , conv )
112112 }
@@ -115,7 +115,7 @@ func (n *NotifyRouterActivityRouter) SetConvRetention(ctx context.Context, uid g
115115func (n * NotifyRouterActivityRouter ) SetTeamRetention (ctx context.Context , uid gregor1.UID ,
116116 teamID keybase1.TeamID , topicType chat1.TopicType , convs []chat1.InboxUIItem ) {
117117 defer n .Trace (ctx , func () error { return nil }, "SetTeamRetention(%s,%v)" , teamID , topicType )()
118- ctx = BackgroundContext (ctx , n .G ())
118+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
119119 n .notifyCh <- func () {
120120 n .G ().NotifyRouter .HandleChatSetTeamRetention (ctx , n .kuid (uid ), teamID , topicType , convs )
121121 }
@@ -124,7 +124,7 @@ func (n *NotifyRouterActivityRouter) SetTeamRetention(ctx context.Context, uid g
124124func (n * NotifyRouterActivityRouter ) SetConvSettings (ctx context.Context , uid gregor1.UID ,
125125 convID chat1.ConversationID , topicType chat1.TopicType , conv * chat1.InboxUIItem ) {
126126 defer n .Trace (ctx , func () error { return nil }, "SetConvSettings(%s,%v)" , convID , topicType )()
127- ctx = BackgroundContext (ctx , n .G ())
127+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
128128 n .notifyCh <- func () {
129129 n .G ().NotifyRouter .HandleChatSetConvSettings (ctx , n .kuid (uid ), convID , topicType , conv )
130130 }
@@ -133,15 +133,15 @@ func (n *NotifyRouterActivityRouter) SetConvSettings(ctx context.Context, uid gr
133133func (n * NotifyRouterActivityRouter ) SubteamRename (ctx context.Context , uid gregor1.UID ,
134134 convIDs []chat1.ConversationID , topicType chat1.TopicType , convs []chat1.InboxUIItem ) {
135135 defer n .Trace (ctx , func () error { return nil }, "SubteamRename(%v,%d convs)" , topicType , len (convs ))()
136- ctx = BackgroundContext (ctx , n .G ())
136+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
137137 n .notifyCh <- func () {
138138 n .G ().NotifyRouter .HandleChatSubteamRename (ctx , n .kuid (uid ), convIDs , topicType , convs )
139139 }
140140}
141141
142142func (n * NotifyRouterActivityRouter ) InboxSyncStarted (ctx context.Context , uid gregor1.UID ) {
143143 defer n .Trace (ctx , func () error { return nil }, "InboxSyncStarted" )()
144- ctx = BackgroundContext (ctx , n .G ())
144+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
145145 n .notifyCh <- func () {
146146 n .G ().NotifyRouter .HandleChatInboxSyncStarted (ctx , n .kuid (uid ))
147147 }
@@ -150,15 +150,15 @@ func (n *NotifyRouterActivityRouter) InboxSyncStarted(ctx context.Context, uid g
150150func (n * NotifyRouterActivityRouter ) InboxSynced (ctx context.Context , uid gregor1.UID ,
151151 topicType chat1.TopicType , syncRes chat1.ChatSyncResult ) {
152152 defer n .Trace (ctx , func () error { return nil }, "InboxSynced(%v)" , topicType )()
153- ctx = BackgroundContext (ctx , n .G ())
153+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
154154 n .notifyCh <- func () {
155155 n .G ().NotifyRouter .HandleChatInboxSynced (ctx , n .kuid (uid ), topicType , syncRes )
156156 }
157157}
158158
159159func (n * NotifyRouterActivityRouter ) InboxStale (ctx context.Context , uid gregor1.UID ) {
160160 defer n .Trace (ctx , func () error { return nil }, "InboxStale" )()
161- ctx = BackgroundContext (ctx , n .G ())
161+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
162162 n .notifyCh <- func () {
163163 n .G ().NotifyRouter .HandleChatInboxStale (ctx , n .kuid (uid ))
164164 }
@@ -167,7 +167,7 @@ func (n *NotifyRouterActivityRouter) InboxStale(ctx context.Context, uid gregor1
167167func (n * NotifyRouterActivityRouter ) ThreadsStale (ctx context.Context , uid gregor1.UID ,
168168 updates []chat1.ConversationStaleUpdate ) {
169169 defer n .Trace (ctx , func () error { return nil }, "ThreadsStale" )()
170- ctx = BackgroundContext (ctx , n .G ())
170+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
171171 n .notifyCh <- func () {
172172 n .G ().NotifyRouter .HandleChatThreadsStale (ctx , n .kuid (uid ), updates )
173173 }
@@ -176,7 +176,7 @@ func (n *NotifyRouterActivityRouter) ThreadsStale(ctx context.Context, uid grego
176176func (n * NotifyRouterActivityRouter ) TLFFinalize (ctx context.Context , uid gregor1.UID ,
177177 convID chat1.ConversationID , topicType chat1.TopicType , finalizeInfo chat1.ConversationFinalizeInfo , conv * chat1.InboxUIItem ) {
178178 defer n .Trace (ctx , func () error { return nil }, "TLFFinalize(%s,%v)" , convID , topicType )()
179- ctx = BackgroundContext (ctx , n .G ())
179+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
180180 n .notifyCh <- func () {
181181 n .G ().NotifyRouter .HandleChatTLFFinalize (ctx , n .kuid (uid ), convID , topicType , finalizeInfo , conv )
182182 }
@@ -185,7 +185,7 @@ func (n *NotifyRouterActivityRouter) TLFFinalize(ctx context.Context, uid gregor
185185func (n * NotifyRouterActivityRouter ) TLFResolve (ctx context.Context , uid gregor1.UID ,
186186 convID chat1.ConversationID , topicType chat1.TopicType , resolveInfo chat1.ConversationResolveInfo ) {
187187 defer n .Trace (ctx , func () error { return nil }, "TLFResolve(%s,%v)" , convID , topicType )()
188- ctx = BackgroundContext (ctx , n .G ())
188+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
189189 n .notifyCh <- func () {
190190 n .G ().NotifyRouter .HandleChatTLFResolve (ctx , n .kuid (uid ), convID , topicType , resolveInfo )
191191 }
@@ -194,7 +194,7 @@ func (n *NotifyRouterActivityRouter) TLFResolve(ctx context.Context, uid gregor1
194194func (n * NotifyRouterActivityRouter ) AttachmentUploadStart (ctx context.Context , uid gregor1.UID ,
195195 convID chat1.ConversationID , outboxID chat1.OutboxID ) {
196196 defer n .Trace (ctx , func () error { return nil }, "AttachmentUploadStart(%s,%s)" , convID , outboxID )()
197- ctx = BackgroundContext (ctx , n .G ())
197+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
198198 n .notifyCh <- func () {
199199 n .G ().NotifyRouter .HandleChatAttachmentUploadStart (ctx , n .kuid (uid ), convID , outboxID )
200200 }
@@ -203,7 +203,7 @@ func (n *NotifyRouterActivityRouter) AttachmentUploadStart(ctx context.Context,
203203func (n * NotifyRouterActivityRouter ) AttachmentUploadProgress (ctx context.Context , uid gregor1.UID ,
204204 convID chat1.ConversationID , outboxID chat1.OutboxID , bytesComplete , bytesTotal int64 ) {
205205 defer n .Trace (ctx , func () error { return nil }, "AttachmentUploadProgress(%s,%s)" , convID , outboxID )()
206- ctx = BackgroundContext (ctx , n .G ())
206+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
207207 n .notifyCh <- func () {
208208 n .G ().NotifyRouter .HandleChatAttachmentUploadProgress (ctx , n .kuid (uid ), convID , outboxID ,
209209 bytesComplete , bytesTotal )
@@ -213,7 +213,7 @@ func (n *NotifyRouterActivityRouter) AttachmentUploadProgress(ctx context.Contex
213213func (n * NotifyRouterActivityRouter ) PromptUnfurl (ctx context.Context , uid gregor1.UID ,
214214 convID chat1.ConversationID , msgID chat1.MessageID , domain string ) {
215215 defer n .Trace (ctx , func () error { return nil }, "PromptUnfurl(%s,%s)" , convID , msgID )()
216- ctx = BackgroundContext (ctx , n .G ())
216+ ctx = globals . BackgroundChatCtx (ctx , n .G ())
217217 n .notifyCh <- func () {
218218 n .G ().NotifyRouter .HandleChatPromptUnfurl (ctx , n .kuid (uid ), convID , msgID , domain )
219219 }
0 commit comments