#106 added pinned messages. Discord announces a change to them with CHANNEL_PINS_UPDATE, which moho does not handle - the dispatch is absent from the
match in backend/discord.rs:4213+.
So the list is right when it is opened and wrong afterwards: somebody pinning a
message while you have the panel open does not appear, and unpinning leaves a message
listed that is no longer pinned. Reopening the panel fixes it, which is the tell.
What is needed
Handle CHANNEL_PINS_UPDATE and re-ask /channels/{id}/pins for that channel, or
simply mark the cached list stale so the next open refetches.
moho's own pin and unpin already refresh the list; this is the other side of it.
Done looks like: a pin made anywhere shows up here without reopening anything.
Reference: the official Discord client.
#106 added pinned messages. Discord announces a change to them with
`CHANNEL_PINS_UPDATE`, which moho does not handle - the dispatch is absent from the
match in `backend/discord.rs:4213+`.
So the list is right when it is opened and wrong afterwards: somebody pinning a
message while you have the panel open does not appear, and unpinning leaves a message
listed that is no longer pinned. Reopening the panel fixes it, which is the tell.
**What is needed**
- Handle `CHANNEL_PINS_UPDATE` and re-ask `/channels/{id}/pins` for that channel, or
simply mark the cached list stale so the next open refetches.
- moho's own pin and unpin already refresh the list; this is the other side of it.
**Done looks like:** a pin made anywhere shows up here without reopening anything.
Reference: the official Discord client.
CHANNEL_PINS_UPDATE says only that the list changed, never what it changed to, so the answer is to ask for it again - list_pinned for that buffer, in its own task so the gateway loop keeps reading while an HTTP round trip happens.
It refetches only for a conversation this client is actually showing (discord_buffer_for_channel returns nothing otherwise). A pin in a guild's four hundredth channel is not worth a request.
Finished.
Handled in nobilis [2aee7a2](https://git.salastil.com/Salastil/nobilis/commit/2aee7a23bf59b2b27a624312b45f1c27ce5e0c1a).
`CHANNEL_PINS_UPDATE` says only that the list changed, never what it changed to, so the answer is to ask for it again - `list_pinned` for that buffer, in its own task so the gateway loop keeps reading while an HTTP round trip happens.
It refetches only for a conversation this client is actually showing (`discord_buffer_for_channel` returns nothing otherwise). A pin in a guild's four hundredth channel is not worth a request.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#106 added pinned messages. Discord announces a change to them with
CHANNEL_PINS_UPDATE, which moho does not handle - the dispatch is absent from thematch in
backend/discord.rs:4213+.So the list is right when it is opened and wrong afterwards: somebody pinning a
message while you have the panel open does not appear, and unpinning leaves a message
listed that is no longer pinned. Reopening the panel fixes it, which is the tell.
What is needed
CHANNEL_PINS_UPDATEand re-ask/channels/{id}/pinsfor that channel, orsimply mark the cached list stale so the next open refetches.
Done looks like: a pin made anywhere shows up here without reopening anything.
Reference: the official Discord client.
Finished.
Handled in nobilis 2aee7a2.
CHANNEL_PINS_UPDATEsays only that the list changed, never what it changed to, so the answer is to ask for it again -list_pinnedfor that buffer, in its own task so the gateway loop keeps reading while an HTTP round trip happens.It refetches only for a conversation this client is actually showing (
discord_buffer_for_channelreturns nothing otherwise). A pin in a guild's four hundredth channel is not worth a request.