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

fix: extract createTemporaryMessage to utils #13784

Merged
merged 3 commits into from
Nov 17, 2024
Merged

Conversation

Antreesy
Copy link
Contributor

☑️ Resolves

  • pure function, not connected to messagesStore
  • default messageType is now set to 'comment'
  • fix: pass mimetype of voice message file

🖌️ UI Checklist

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Not risky to browser differences / client
  • ⛑️ Tests are included or not possible

@Antreesy Antreesy added this to the 🖤 Next Major (31) milestone Nov 15, 2024
@Antreesy Antreesy requested a review from DorraJaouad November 15, 2024 10:27
@Antreesy Antreesy self-assigned this Nov 15, 2024
@Antreesy Antreesy force-pushed the fix/noid/temp-message-util branch from 4009539 to 8e5bcb6 Compare November 15, 2024 13:33
@DorraJaouad
Copy link
Contributor

This is better if it is a composable actually. That's because actorId, actorType, actorDisplayName, parent are always available from store, so the method would need only these as arguments (variables):

	text,
	token,
	uploadId,
	index,
	file,
	localUrl,
	isVoiceMessage,

@Antreesy
Copy link
Contributor Author

This is better if it is a composable actually

I would agree that composable wrapper may be used in the component, but function itself is to remain stateless

- pure and stateless
- return type matches server response

Signed-off-by: Maksim Sukharev <[email protected]>
- provide some arguments for util based on store content
- clean up in Vuex stores
- adjust tests

Signed-off-by: Maksim Sukharev <[email protected]>
@Antreesy Antreesy force-pushed the fix/noid/temp-message-util branch from 8e5bcb6 to 3071d4d Compare November 16, 2024 17:01
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

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

Tested

@Antreesy Antreesy merged commit 71f9d6c into main Nov 17, 2024
46 checks passed
@Antreesy Antreesy deleted the fix/noid/temp-message-util branch November 17, 2024 14:34
@Antreesy
Copy link
Contributor Author

/backport to stable30

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

Successfully merging this pull request may close these issues.

2 participants