File tree 1 file changed +7
-1
lines changed
apps/api/src/chat/services
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ export class BroadcastConsumer {
76
76
const totalContacts = contacts . length
77
77
contacts = contacts . filter ( ( contact ) => ! campaignMessageAddresses . includes ( contact . address ) )
78
78
79
+ contacts = contacts . sort ( ( ) => Math . random ( ) - 0.5 )
80
+
79
81
if ( campaign . state === CampaignState . Pending ) {
80
82
campaign . state = CampaignState . Running
81
83
await this . campaignService . updateOneNative (
@@ -135,7 +137,11 @@ export class BroadcastConsumer {
135
137
campaign . processed ++
136
138
job . progress ( campaign . processed / campaign . total )
137
139
} catch ( e ) {
138
- if ( e . message . includes ( 'is not on the XMTP network' ) || e . message . includes ( 'self messaging not supported' ) ) {
140
+ if (
141
+ e . message . includes ( 'is not on the XMTP network' ) ||
142
+ e . message . includes ( 'self messaging not supported' ) ||
143
+ e . message . includes ( 'Message sending timed out' )
144
+ ) {
139
145
try {
140
146
await this . campaignMessageService . createOne ( {
141
147
campaign : campaign . _id ,
You can’t perform that action at this time.
0 commit comments