Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests + announce notification fix #193

Merged
merged 1 commit into from
Sep 4, 2021
Merged

tests + announce notification fix #193

merged 1 commit into from
Sep 4, 2021

Conversation

tsmethurst
Copy link
Contributor

@tsmethurst tsmethurst commented Sep 4, 2021

This PR fixes a tiny issue with reblog/boost notifications not being created (replacing == with != in one file -- https://github.com/superseriousbusiness/gotosocial/pull/193/files#diff-4702c34f947db9e2ac6ce9f82430f5ac32d518f76ba4dc3e9963383a2d2f9499R255), and adds some tests to validate that notifications are created when a boost/reblog is processed.

It also adds a couple of tests elsewhere, and tidies up some existing tests.

closes #170

@@ -44,3 +45,27 @@ type BunDBStandardTestSuite struct {
testTags map[string]*gtsmodel.Tag
testMentions map[string]*gtsmodel.Mention
}

func (suite *BunDBStandardTestSuite) SetupSuite() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this was a change i had in mind for a while now, much neater :D

@@ -254,7 +252,7 @@ func (p *processor) notifyAnnounce(ctx context.Context, status *gtsmodel.Status)
status.BoostOfAccount = boostedAcct
}

if status.BoostOfAccount.Domain == "" {
if status.BoostOfAccount.Domain != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh damn, this is a silly one 😅

@tsmethurst tsmethurst merged commit ff05046 into main Sep 4, 2021
@tsmethurst tsmethurst deleted the announce_notif_fix branch September 4, 2021 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Reblog/boost notifications not working
2 participants