Skip to content

Feature request: Daily Task FORM_AN_INNER_CONNECTION implementation #949

Description

@tickBit

What do you want to see in the API?

Implement the new server-tracked Daily Task FORM_AN_INNER_CONNECTION.

The task should be completed when a player sends one successful clan chat message.

This replaces the older generic chat-message task behavior for this specific new Daily Task. The client should not report Daily Task progress manually.

How do you think this should work?

The task should follow the existing Daily Task flow:

  1. A clan has FORM_AN_INNER_CONNECTION available as a Daily Task.
  2. A player reserves the task.
  3. The player opens clan chat and sends a message.
  4. After the server successfully handles the clan chat message, the server emits a Daily Task event for FORM_AN_INNER_CONNECTION.
  5. The existing Daily Task update logic decrements amountLeft.
  6. Since this task requires only one clan chat message, amount should be 1.
  7. When amountLeft reaches 0, the task is completed through the normal Daily Task completion flow.

The event should be emitted from the successful clan message path in src/chat/chat.gateway.ts.

Example flow in plain terms:

  • player sends a clan chat message
  • ChatGateway passes it to ClanChatService
  • if the message is accepted successfully, emit FORM_AN_INNER_CONNECTION
  • DailyTasksService.handleDailyTaskEvent(...) handles the event
  • existing updateTask(...) and DailyTaskProgressService.handleProgress(...) complete the task and send the normal notifications

No additional progress payload is needed for this task. Unlike PLAY_WITH_EMOTIONS, this task does not need to remember message feelings or any other per-task progress state.

About MQTT flow

The client only sends a normal clan chat WebSocket message. After the server accepts that message, the Daily Task system updates the reserved FORM_AN_INNER_CONNECTION task.

If the task completes, the existing Daily Task MQTT notification flow should notify clients through DailyTaskProgressService and DailyTaskNotifier.

No new custom MQTT notification type is needed.

Expected behavior:

  • successful clan chat message completes the task
  • completion uses existing Daily Task reward logic
  • completion sends existing Daily Task MQTT completion notifications
  • failed clan chat messages must not complete the task
  • global chat messages must not complete the task

Any additional info?

Acceptance criteria:

  • FORM_AN_INNER_CONNECTION is a valid active ServerTaskName.
  • The task has amount: 1.
  • The task progresses only after a successful clan chat message.
  • The task does not progress from global chat messages.
  • The task does not progress if saving/sending the clan chat message fails.
  • No extra progress schema field is required for this task.
  • Completion uses the existing Daily Task completion, reward, and MQTT notification flow.

After FORM_AN_INNER_CONNECTION has been implemented and verified, move the old generic chat task out of active server tasks.

The old task should no longer remain in ServerTaskName:

WRITE_CHAT_MESSAGE = 'write_chat_message'

Move it to src/dailyTasks/enum/oldTaskNames.enum.ts instead.

Suggested tests:

  • successful clan chat message completes FORM_AN_INNER_CONNECTION
  • failed clan chat message does not complete it
  • global chat message does not complete it
  • completion uses the existing Daily Task progress/completion path

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature to add

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions