File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,10 +205,29 @@ window.widget.serviceModules.registerServiceModuleProvider({
205205 let str = "" ;
206206 // Update subathon end timestamp
207207 switch ( activity . type ) {
208+ case 'communityGiftPurchase' :
209+ switch ( activity . data . tier ) {
210+ case "1000" :
211+ str = managedData . timeAdditions . t1 [ 1 ] ;
212+ if ( isInt ( str ) && managedData . timeAdditions . t1 [ 0 ] ) addTime ( parseInt ( str , 10 ) * activity . data . amount ) ;
213+ break ;
214+ case "2000" :
215+ str = managedData . timeAdditions . t2 [ 1 ] ;
216+ if ( isInt ( str ) && managedData . timeAdditions . t2 [ 0 ] ) addTime ( parseInt ( str , 10 ) * activity . data . amount ) ;
217+ break ;
218+ case "3000" :
219+ str = managedData . timeAdditions . t3 [ 1 ] ;
220+ if ( isInt ( str ) && managedData . timeAdditions . t3 [ 0 ] ) addTime ( parseInt ( str , 10 ) * activity . data . amount ) ;
221+ break ;
222+ }
223+ break ;
208224 case 'subscriber' :
209225 if ( activity . bulkGifted ) { // Ignore gifting event and count only real subs
210226 return ;
211227 }
228+ if ( activity . activityGroup ) { // Ignore community gifted subs because we used the communityGiftPurchase Activity to add time for these
229+ return ;
230+ }
212231 switch ( activity . data . tier ) {
213232 case "1000" :
214233 str = managedData . timeAdditions . t1 [ 1 ] ;
You can’t perform that action at this time.
0 commit comments