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

Allow other apps to register message actions #5019

Conversation

marcoambrosini
Copy link
Member

@marcoambrosini marcoambrosini commented Jan 26, 2021

How to test:

  • Open the developer console and type:
window.OCA.Talk.registerMessageAction({
	label: 'test',
	callback: (messageAPIData) => console.log(messageAPIData),
	icon: 'icon-user',
})
  • Open a message 3 dot menu;

  • Click on the added action;

  • Check if the response object is logged in the console

Signed-off-by: Marco Ambrosini marcoambrosini@pm.me

@marcoambrosini marcoambrosini force-pushed the feature/noid/allow-other-apps-to-register-message-actions branch from 1914498 to 5318d57 Compare January 26, 2021 15:13
src/main.js Outdated Show resolved Hide resolved
@marcoambrosini marcoambrosini force-pushed the feature/noid/allow-other-apps-to-register-message-actions branch from 5318d57 to d54da5e Compare January 27, 2021 14:40
@nickvergessen
Copy link
Member

So I used:

window.OCA.Talk.registerMessageAction({
	label: 'test',
	callback: (messageAPIData) => console.log(messageAPIData),
	icon: 'icon-reply',
})

but the icon is still black on dark mode. I guess there is some specialty required to stop the auto-invert of something as it might happen twice (action inverts it and the img is actually already inverted)

Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@marcoambrosini
Copy link
Member Author

but the icon is still black on dark mode. I guess there is some specialty required to stop the auto-invert of something as it might happen twice (action inverts it and the img is actually already inverted)

hmm, this is a weird one, this happens with the original reply button too. And it seems to disappear only on hover. Anyhow seems it's not related to this pr as it's reproducible on master

Peek 2021-02-01 16-15

Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@marcoambrosini marcoambrosini force-pushed the feature/noid/allow-other-apps-to-register-message-actions branch from d54da5e to e75bee7 Compare February 1, 2021 16:27
@nickvergessen nickvergessen merged commit b602859 into master Feb 2, 2021
@nickvergessen nickvergessen deleted the feature/noid/allow-other-apps-to-register-message-actions branch February 2, 2021 12:30
@nickvergessen nickvergessen mentioned this pull request Feb 2, 2021
8 tasks
@juliusknorr
Copy link
Member

Tested and works with me WIP implementation 👍

@nickvergessen
Copy link
Member

/backport to stable21.1

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.

3 participants