discord-php / DiscordPHP

An API to interact with the popular messaging app Discord
MIT License
985 stars 236 forks source link

Fix thread id repository and cache, thread last_message_id #1010

Closed SQKo closed 1 year ago

SQKo commented 1 year ago

Fixed thread_id failed to bind when fetching thread from repository And removed the duplicates of thread_id & channel_id in (Thread) MemberRepository (removes channel_id because the endpoint binds to thread_id) & MessageRepository (removes thread_id because the endpoint binds to channel_id).

Fixed thread last_message_id on THREAD_CREATE Event, According to API (also when re-freshen), the newly created thread would have last_message_id = null due to the message thread will have it after MESSAGE_CREATE event.

Tested.