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

cancelled quests should have message in party chat #11093

Closed
Alys opened this issue Mar 31, 2019 · 2 comments · Fixed by #11106
Closed

cancelled quests should have message in party chat #11093

Alys opened this issue Mar 31, 2019 · 2 comments · Fixed by #11106

Comments

@Alys
Copy link
Contributor

Alys commented Mar 31, 2019

When the quest owner or party leader cancels a quest that's still in the invitation phase, there's no indication for other party members that that's what happened and it can lead to confusion (there was a recent bug report from someone who understandably thought that something had gone wrong with the quest).

There should be a message posted to party chat to say, for example, "Alys cancelled the party quest Vice, Part 1: Free Yourself of the Dragon's Influence."

A similar message already exists for the case where a running quest is aborted so similar code could be used for this issue:

$ git grep "the party quest"
test/api/v3/integration/quests/POST-groups_groupid_quests_abort.test.js:130:    expect(Group.prototype.sendChat).to.be.calledWithMatch(/aborted the party quest Wail of the Whale.`/);
website/server/controllers/api-v3/quests.js:425:    const newChatMessage = group.sendChat(`\`${user.profile.name} aborted the party quest ${questName}.\``);
/code/habitica 2048 $ 

Also, as part of the fix for this issue, please change the comment shown below to remove (see questCancel for BEFORE) because the function it refers to is now called cancelQuest and it's likely that we'll forget to update the comment if we rename it again :)

// Abort a quest AFTER it has begun (see questCancel for BEFORE)

@HydeHunter2
Copy link
Contributor

HydeHunter2 commented Apr 4, 2019

Hey!
I'd like to take this, if it's relevant.
Can I send a pull request?

@Alys
Copy link
Contributor Author

Alys commented Apr 6, 2019

@HydeHunter2 Thanks for the PR!

I've changed the labels on this issue to remove "help wanted".

paglias pushed a commit that referenced this issue Apr 14, 2019
* Add message of cancelled quest in party chat

Issue #11093

* Delete trailing spaces

For successful passing the test

* Add test of cancelled quest's message

Also, added an explanation that partyMembers[1] hasn't accepted the invitation in the 'cancels a quest' test

* Fix: import Group

Import Group to pass Lint syntax test

* Move save function to Promise.all

* Fix moving save to Promise.all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants