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

When use server-side Presend Message Hook return error, the message createdAt field is not correct #76

Closed
yswtrue opened this issue Aug 28, 2020 · 3 comments
Labels

Comments

@yswtrue
Copy link

yswtrue commented Aug 28, 2020

When I use the server-side hook and block user send messages to another, but the createAt field of the error message is not correct.
look like this.
image

gz#5629

@yswtrue
Copy link
Author

yswtrue commented Aug 28, 2020

I have followed this document
'https://getstream.io/chat/docs/presend_message_hook/?language=python'

and then return the error message:

{
    'message': {
        'id': '53873826-d38e-4a09-86fe-db6aaa154572',
        'text': 'You are blocked by the target user',
        'html': '',
        'type': 'error',
        'user': None,
        'attachments': [],
        'latest_reactions': [],
        'own_reactions': [],
        'reaction_counts': None,
        'reaction_scores': None,
        'reply_count': 0,
        'created_at': None,
        'updated_at': None,
        'mentioned_users': [],
        'silent': False
    },
    'user': {
        'id': '2179',
        'role': 'user',
        'created_at': '2020-07-26T15:06:49.16889Z',
        'updated_at': '2020-08-28T12:26:21.755598Z',
        'last_active': '2020-08-28T12:26:21.755598Z',
        'banned': False,
        'online': True,
        'countryCode': 'IT',
        'image': 'https://s3-ap-northeast-1.amazonaws.com/hom-chat/image_cropper_1595507748170.jpg',
        'invisible': False,
        'name': 'momo',
        'unread_count': 14
    },
    'channel': {
        'cid': 'messaging:!members-qC1TjcdwboxT0IIrj4jQE1aXa_a4vsFxnv7YJfARg8Y',
        'id': '!members-qC1TjcdwboxT0IIrj4jQE1aXa_a4vsFxnv7YJfARg8Y',
        'type': 'messaging',
        'last_message_at': '2020-08-28T12:20:55.668315Z',
        'created_at': '2020-08-28T06:23:39.515782Z',
        'updated_at': '2020-08-28T06:23:39.515782Z',
        'frozen': False,
        'members': [{
            'user_id': '2179',
            'user': {
                'id': '2179',
                'role': 'user',
                'created_at': '2020-07-26T15:06:49.16889Z',
                'updated_at': '2020-08-28T12:26:21.755598Z',
                'last_active': '2020-08-28T12:26:21.755598Z',
                'banned': False,
                'online': True,
                'invisible': False,
                'name': 'momo',
                'unread_count': 14,
                'countryCode': 'IT',
                'image': 'https://s3-ap-northeast-1.amazonaws.com/hom-chat/image_cropper_1595507748170.jpg'
            },
            'created_at': '2020-08-28T06:23:39.520256Z',
            'updated_at': '2020-08-28T06:23:39.520256Z'
        }, {
            'user_id': '2199',
            'user': {
                'id': '2199',
                'role': 'user',
                'created_at': '2020-08-06T08:02:29.2408Z',
                'updated_at': '2020-08-28T10:08:56.746505Z',
                'last_active': '2020-08-28T10:08:56.746505Z',
                'banned': False,
                'online': False,
                'countryCode': 'HK',
                'image': 'https://s3-ap-northeast-1.amazonaws.com/hom-chat/image_cropper_1598426597840.jpg',
                'invisible': False,
                'name': 'KAN Siu Chung',
                'unread_count': 1
            },
            'created_at': '2020-08-28T06:23:39.520256Z',
            'updated_at': '2020-08-28T06:23:39.520256Z'
        }],
        'member_count': 2,
        'config': {
            'created_at': '2020-08-27T16:38:40.389045073Z',
            'updated_at': '2020-08-27T16:38:40.389047897Z',
            'name': 'messaging',
            'typing_events': True,
            'read_events': True,
            'connect_events': True,
            'search': True,
            'reactions': True,
            'replies': True,
            'mutes': True,
            'uploads': True,
            'url_enrichment': True,
            'message_retention': 'infinite',
            'max_message_length': 5000,
            'automod': 'disabled',
            'automod_behavior': 'flag',
            'commands': ['fun_set']
        }
    }
}

@imtoori
Copy link
Contributor

imtoori commented Aug 28, 2020

Hey @yswtrue

It seems that this is a server-side problem.
The issue has been reported to our backend team and it will be fixed asap.
I'll let you know once it's fixed.

Thanks for reporting it

@imtoori
Copy link
Contributor

imtoori commented Sep 1, 2020

@yswtrue the backend bugfix has been deployed to production

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

No branches or pull requests

2 participants