Add handling for 'Twitterversary' account anniversary notification
This commit is contained in:
parent
efe453dbe3
commit
368209a1cc
@ -175,6 +175,10 @@ func (t *APIv1Response) ToTweetTroveAsNotifications(current_user_id UserID) (Twe
|
||||
// Native ad for buying X Premium; ignore
|
||||
delete(ret.Notifications, notification.ID)
|
||||
continue
|
||||
} else if strings.Contains(entry.Content.Item.ClientEventInfo.Element, "twitterversary") {
|
||||
// Account creation anniversary; ignore
|
||||
delete(ret.Notifications, notification.ID)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,6 +142,10 @@ func TestParseNotificationsPage(t *testing.T) {
|
||||
_, is_ok = tweet_trove.Notifications["FKncQJGVgAQAAAABSQ3bEak9zbD6K-zcrss"]
|
||||
assert.False(is_ok)
|
||||
|
||||
// Account anniversary
|
||||
_, is_ok = tweet_trove.Notifications["FKncQJGVgAQAAAABSQ3bEcn0fxXGKlGGZK8"]
|
||||
assert.False(is_ok)
|
||||
|
||||
// Check users
|
||||
for _, u_id := range []UserID{1458284524761075714, 28815778, 1633158398555353096} {
|
||||
_, is_ok := tweet_trove.Users[u_id]
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user