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

Insert gif from giphy #390

Merged
merged 4 commits into from
Mar 13, 2023
Merged

Insert gif from giphy #390

merged 4 commits into from
Mar 13, 2023

Conversation

hkhanouchi
Copy link
Contributor

@hkhanouchi hkhanouchi commented Mar 8, 2023

Screen.Recording.2023-03-08.at.23.41.52.mov

@AdamDotCom AdamDotCom self-requested a review March 8, 2023 18:25
@AdamDotCom
Copy link
Contributor

AdamDotCom commented Mar 8, 2023

A Giphy image is a url link and a non native file so we don't need to upload it. We should be sending this message to the chatChannels/:id/message endpoint. Having said that the chatChannels/:id/message needed to be adjusted to accept the giphy params. Related PR: https://github.com/m3m3n70/zero-api/pull/937

The call from the saga to send the image url might look like:

const file = { url: giphyFile.url, name: giphyFile.name, type: giphyFile.type };
const messagesResponse = yield call(sendMessagesByChannelId, channelId, undefined, undefined, undefined, file);

Outstanding questions:

  • ZERO Web support mentioning users in a Giphy message, do we have this functionality in zOS?
  • ZERO Web supports sending text alongside a Giphy message, do we have this functionality in zOS?
  • ZERO Web supports deleting a Giphy message, do we have this functionality in zOS?
  • ZERO Web hides the 'reply' and 'edit' menu items for a Giphy message, do we have this functionality in zOS?

@hkhanouchi hkhanouchi marked this pull request as ready for review March 8, 2023 22:40
@hkhanouchi
Copy link
Contributor Author

hkhanouchi commented Mar 8, 2023

A Giphy image is a url link and a non native file so we don't need to upload it. We should be sending this message to the chatChannels/:id/message endpoint. Having said that the chatChannels/:id/message needed to be adjusted to accept the giphy params. Related PR: m3m3n70/zero-api#937

The call from the saga to send the image url might look like:

const file = { url: giphyFile.url, name: giphyFile.name, type: giphyFile.type };
const messagesResponse = yield call(sendMessagesByChannelId, channelId, undefined, undefined, undefined, file);

Outstanding questions:

  • ZERO Web support mentioning users in a Giphy message, do we have this functionality in zOS?
  • ZERO Web supports sending text alongside a Giphy message, do we have this functionality in zOS?
  • ZERO Web supports deleting a Giphy message, do we have this functionality in zOS?
  • ZERO Web hides the 'reply' and 'edit' menu items for a Giphy message, do we have this functionality in zOS?

--

  • ZERO Web support mentioning users in a Giphy message, do we have this functionality in zOS? YES
  • ZERO Web supports sending text alongside a Giphy message, do we have this functionality in zOS? YES
  • ZERO Web supports deleting a Giphy message, do we have this functionality in zOS? YES
  • ZERO Web hides the 'reply' and 'edit' menu items for a Giphy message, do we have this functionality in zOS? YES

@hkhanouchi hkhanouchi requested a review from a team March 8, 2023 23:32
@hkhanouchi hkhanouchi force-pushed the feature/insert-gif-giphy branch 2 times, most recently from 09e3915 to cb5278f Compare March 8, 2023 23:39
@hkhanouchi
Copy link
Contributor Author

I found a bug to mention users in the app (Dev, Prod).
@AdamDotCom Could you please create a story for this.

Screen Shot 2023-03-09 at 11 40 26

Copy link
Contributor

@AdamDotCom AdamDotCom left a comment

Choose a reason for hiding this comment

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

Can you add a test in the saga.test.ts file for:

  1. sending a Giphy as it's own message
  2. sending a Giphy with text

The Giphy message is showing up twice in my local environment (screen capture included).

duplicate-giphy-message.mov

@hkhanouchi hkhanouchi merged commit 38ebc1b into main Mar 13, 2023
@hkhanouchi hkhanouchi deleted the feature/insert-gif-giphy branch March 13, 2023 16:03
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.

None yet

2 participants