For Chat SDK of flutter how to send Audio or video message?

Hello, to delete a conversation channel, you can utilise this API: Amity API

how to pass authorization token in that?

Hello, you can use admintoken, please refer here: https://docs.amity.co/technical-faq#what-should-i-use-as-the-authorization-token-when-i-need-to-perform-admin-actions

Hey,

I have created one conversation channel between 2 users.
For example, “Sam” wants to chat with “Andrew”.

“Sam” created a channel in which display name goes as “Andrew”
but when “Andrew” updates his name, It’s not updating channel display name

What to do in this case? how to update channel name when user updates his profile?

Hello @puja , When there are only 2 users in a channel, it’s recommended to store both users’ userIds in the channel metadata. This allows for efficient retrieval of user information when querying the channel. Here’s how you can refine the process:

  1. Store User IDs in Channel Metadata:

    • When creating a channel with 2 users, save both users’ userIds in the channel metadata.
  2. Querying the Channel:

    • Retrieve the channel metadata and extract the userIds of both users.
  3. Retrieve User Information:

    • Use the extracted userIds to fetch user information (e.g., userDisplayname) using your platform’s getUsers method.
  4. Display User Information in UI:

    • Determine which displayName corresponds to the current user and which to the other user.
    • Display the other user’s displayName in your chat interface.

Hey @amitysupport

Thanks for reply, that’s not actual problem

Actual problem is when user changes his name
Push notification takes display name as channel name. What to do for that?

Hello @puja, could you please help clarify? Did you mean that the push notification takes their new display name or their old one?

I stored both users data into metadata and display name as other user’s name Let’s say “Sam”

Now “Sam” is updated his profile to “Hugh” but when push notification arrives it is still displayed as “Sam”

how to resolve that?

Hello @puja , For your issue, you can adjust push notifications through the console. Please refer to this link for more details: Push Notifications Settings.

I have added “AmiltyUserHelper().logoutUser();” code to logout user but he is still receiving notification.

It’s not terminating session. Can you please check this out?

Hello @puja For your issue, could you please try this:

void unRegisterDevice() {
    AmityCoreClient.unregisterDeviceNotification();
    AmityCoreClient.logout();
}

Hello,

I am using below method to get channels

PagingController(
pageFuture: (token) => AmityChatClient.newChannelRepository()
.getChannels()
.withKeyword(_keyboard.isEmpty ? null : _keyboard)
.sortBy(_sort)
.filter(_filter)
.types(_type)
.includingTags(_tags ?? )
.excludingTags(_excludingTags ?? )
.includeDeleted(false)
.getPagingData(token: token, limit: 20),
pageSize: 20,

When a new message arrives in a channel it should be shown on top like other chat applications for example whatsapp, telegram or messanger.

Is there any way to achieve this in flutter?

Hello @puja , Let me pass this to our team for checking, and I’ll get back to you.

Hello @puja , Could you please provide the Flutter SDK version that you are using for further checking?

Thank you.

I am using below flutter version

Flutter 3.19.5 • channel stable • GitHub - flutter/flutter: Flutter makes it easy and fast to build beautiful apps for mobile and beyond
Framework • revision 300451adae (4 months ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1

Hello @puja Could you please provide the version of the Amity Flutter SDK you are using? You can refer to the documentation for versioning details here: Amity Flutter SDK Changelogs and Versioning.

Thank you!

I am using amity_sdk: ^0.46.0

Hello @puja , Thank you for the information you provided. I’ll pass this to the relevant team to check, and if I have any updates, I will inform you.

Hello,

Is there any way to achieve that?

Hello, our team is currently working on this task. We will provide updates as soon as they are available. Thank you.

1 Like