The Status module that consumes go-ethereum https://status.im
Go to file
Pascal Precht 9c568c58cf feat: introduce messenger APIs to extract discord channels
As part of the new Discord <-> Status Community Import functionality,
we're adding an API that extracts all discord categories and channels
from a previously exported discord export file.

These APIs can be used in clients to show the user what categories and
channels will be imported later on.

There are two APIs:

1. `Messenger.ExtractDiscordCategoriesAndChannels(filesToimport
   []string) (*MessengerResponse, map[string]*discord.ImportError)`

   This takes a list of exported discord export (JSON) files (typically one per
   channel), reads them, and extracts the categories and channels into
   dedicated data structures (`[]DiscordChannel` and `[]DiscordCategory`)

   It also returns the oldest message timestamp found in all extracted
   channels.

   The API is synchronous and returns the extracted data as
   a `*MessengerResponse`. This allows to make the API available
   status-go's RPC interface.

   The error case is a `map[string]*discord.ImportError` where each key
   is a file path of a JSON file that we tried to extract data from, and
   the value a `discord.ImportError` which holds an error message and an
   error code, allowing for distinguishing between "critical" errors and
   "non-critical" errors.

2. `Messenger.RequestExtractDiscordCategoriesAndChannels(filesToImport
   []string)`

   This is the asynchronous counterpart to
   `ExtractDiscordCategoriesAndChannels`. The reason this API has been
   added is because discord servers can have a lot of message and
   channel data, which causes `ExtractDiscordCategoriesAndChannels` to
   block the thread for too long, making apps potentially feel like they
   are stuck.

   This API runs inside a go routine, eventually calls
   `ExtractDiscordCategoriesAndChannels`, and then emits a newly
   introduced `DiscordCategoriesAndChannelsExtractedSignal` that clients
   can react to.

   Failure of extraction has to be determined by the
   `discord.ImportErrors` emitted by the signal.

**A note about exported discord history files**

We expect users to export their discord histories via the
[DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#exportguild)
tool. The tool allows to export the data in different formats, such as
JSON, HTML and CSV.

We expect users to have their data exported as JSON.

Closes: https://github.com/status-im/status-desktop/issues/6690
2022-08-04 14:34:23 +02:00
.dependabot Patch/dependabot protocol (#1980) 2020-05-19 00:14:02 +01:00
.github fix documentation url in the checklist (#2770) 2022-07-22 22:12:29 +05:30
.vscode Add go.formatFlags to VS Code settings 2020-01-16 13:18:36 +01:00
_assets fix: apt -> apt-get (#2775) 2022-08-03 11:26:31 +02:00
_docs rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
_examples go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
account Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
api Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
appdatabase feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
appmetrics rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
build/bin add .gitkeep to build/bin so it always exists 2019-03-05 14:22:00 +01:00
cmd rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
common Move services to status-node 2021-07-20 10:57:38 +02:00
config chore: add status.prod fleet (#2583) 2022-03-11 15:48:51 -05:00
connection Address linter issues 2022-03-28 13:14:12 +01:00
contracts goerli: contracts, bump version 2022-07-20 14:15:15 +02:00
db Address linter issues 2022-03-28 13:14:12 +01:00
discovery feat: obtain external address for rendezvous (#2333) 2021-09-06 09:46:35 -04:00
eth-node Introduce community history archive routine 2022-04-06 13:00:33 +02:00
exportlogs Upgrade geth to 1.9.5 and Whisper (#1617) 2019-10-04 17:21:24 +02:00
extkeys Upgrade geth 2021-07-20 10:57:38 +02:00
images rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
ipfs Stop download of stickers on canceling context (#2699) 2022-06-02 22:03:16 +05:30
logutils Removed unnecessary dependency from logutil package 2021-08-19 11:35:40 +02:00
mailserver feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
metrics metrics: fix p2p_peers_count metrics labels 2021-08-24 11:07:39 +02:00
mobile rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
multiaccounts feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
node feat: multi transaction (#2751) 2022-07-15 10:53:56 +02:00
nodecfg feat: Added new params for shortName and color for the networks (#2681) 2022-06-17 00:12:21 +05:30
notifier Notifier package to interact with gorush notifications (#910) 2018-05-08 16:30:03 +02:00
params feat: Added new params for shortName and color for the networks (#2681) 2022-06-17 00:12:21 +05:30
peers feat: Rpc client manage multiple eth client (#2359) 2021-09-22 13:49:20 -04:00
postgres Anon Metrics Broadcast (#2198) 2021-09-01 13:02:18 +01:00
profiling Add profiling with pprof (#754) 2018-03-23 14:58:40 +01:00
protocol feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
rpc feat: Added new params for shortName and color for the networks (#2681) 2022-06-17 00:12:21 +05:30
rtt rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
server Fixed Suite test 2022-06-20 15:33:09 +01:00
services feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
signal feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
sqlite Sync Settings (#2478) 2022-03-23 18:47:00 +00:00
static feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
t feat: introduce messenger APIs to extract discord channels 2022-08-04 14:34:23 +02:00
telemetry feat: Push messages to telemetry server when receiving messages 2021-11-10 09:34:14 +01:00
timesource Move services to status-node 2021-07-20 10:57:38 +02:00
transactions feat: Simple transaction router (#2686) 2022-06-09 15:09:56 +02:00
vendor chore: bump markdown (#2726) 2022-06-29 08:15:21 -04:00
waku rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
wakuv2 rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
.codeclimate.yml fix: exclude migrations from codeclimate (#2284) 2021-07-22 14:04:21 -04:00
.dockerignore Ignore *.test files from all folders (#635) 2018-02-08 14:23:08 +02:00
.gitignore feat: add visual identity service (#2550) 2022-03-11 16:17:48 -05:00
.golangci.yml Remove protocol and eth-node submodules (#1835) 2020-02-10 12:22:37 +01:00
.travis.yml Remove e2e tests from steps 2021-07-20 10:57:38 +02:00
BOOTNODE.md docs: clarify purpose and describe ports 2020-02-06 18:44:23 +01:00
CMakeLists.txt dev: allow option to force compiling for apple silicon 2022-06-30 09:42:19 +02:00
CONTRIBUTING.md rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
LICENSE.md Create LICENSE.md 2016-09-21 10:00:29 +08:00
MAILSERVER.md rcp.sh: curl wrapper for easier RPC calls 2021-08-24 11:23:25 +02:00
Makefile Makefile: drop deprecated -i flag from go build 2022-07-26 13:06:43 +02:00
README.md Explain how to run Waku node in README (#1921) 2020-04-09 18:33:53 +02:00
RELEASING.md rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
VERSION [#13647] Avoid rewriting of `response.Settings` on new acc sync 2022-08-03 12:12:53 +02:00
WAKU.md Create WAKU.md with spec support (#1855) 2020-02-21 17:56:15 +08:00
go.mod chore: bump markdown (#2726) 2022-06-29 08:15:21 -04:00
go.sum chore: bump markdown (#2726) 2022-06-29 08:15:21 -04:00