File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -220,23 +220,19 @@ export default createStore({
220
220
currentChat . messages [ responseIndex ] . threadIndex = threadIndex ;
221
221
} ,
222
222
async updateMessage ( state ) {
223
- const keyAndChangesArr = [ ] ;
224
223
for ( const update of messageBuffer ) {
225
224
const { index, message } = update ;
226
- keyAndChangesArr . push ( { key : index , changes : message } ) ;
225
+ await Messages . table . update ( index , message ) ;
227
226
}
228
- await Messages . table . bulkUpdate ( keyAndChangesArr ) ;
229
227
state . updateCounter += 1 ;
230
228
messageBuffer = [ ] ;
231
229
isThrottleMessage = false ;
232
230
} ,
233
231
async updateThreadMessage ( state ) {
234
- const keyAndChangesArr = [ ] ;
235
232
for ( const update of threadMessageBuffer ) {
236
233
const { index, message } = update ;
237
- keyAndChangesArr . push ( { key : index , changes : message } ) ;
234
+ await Threads . table . update ( index , message ) ;
238
235
}
239
- await Threads . table . bulkUpdate ( keyAndChangesArr ) ;
240
236
state . updateCounter += 1 ;
241
237
threadMessageBuffer = [ ] ;
242
238
isThrottleThreadMessage = false ;
You can’t perform that action at this time.
0 commit comments