| 431 | } |
| 432 | |
| 433 | func formatActivity(activityType string) (isHidden bool, formattedActivityType string) { |
| 434 | if activityType == constant.ActVotedUp || |
| 435 | activityType == constant.ActVotedDown || |
| 436 | activityType == constant.ActFollow { |
| 437 | return true, "" |
| 438 | } |
| 439 | if activityType == constant.ActVoteUp { |
| 440 | return false, constant.ActUpVote |
| 441 | } |
| 442 | if activityType == constant.ActVoteDown { |
| 443 | return false, constant.ActDownVote |
| 444 | } |
| 445 | if activityType == constant.ActAccepted { |
| 446 | return false, constant.ActAccept |
| 447 | } |
| 448 | return false, activityType |
| 449 | } |