Chat APIs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- api
Hướng nghiên cứu
The issue proposes chat namespaces, provider APIs, permissions, and manifest.json declarations, but names no source files, tests, or entry points. Start by reviewing the existing extension architecture and manifest.json, then determine which part of the proposal is in scope. The issue has no concrete completion criteria, so an agreed design and bounded implementation target are needed before work can be considered done.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There should be a namespace to interact with chat. The following is an old draft of mine of what that could look like:
APIs (ordered by namespaces)
- chat
- conversations
- Conversation
- id
- accountId
- muc
- name
- room
- buddyId
- unreadCount
- mentionCount
- lastReadMessage
- topic
- Participants: Array of Participant
- Participant
- id
- name
- conversationId
- avatar
- status
- statusText
- metaDetails
- mode (OP etc.)
- create
- accountId
- room?
- buddyId?
- update
- conversationId
- index?
- unread progress/state?
- selected?
- query
- selected?
- index?
- providerId?
- accountId?
- muc?
- conversationId?
- close
- conversationId
- getParticipants
- conversationId
- updateParticipant
- participantId
- updatedParticipant
- onCreated
- onUpdated
- onClosed
- onTooltip -> allows adding data to the tooltip
- Conversation
- buddies
- Buddy
- id
- accountId
- status
- statusText
- create
- accountId
- buddy login or whatever
- nickname
- update
- nickname
- query
- buddyId?
- nickname?
- accountId?
- providerId?
- remove
- buddyId
- onCreated
- onUpdated
- onRemoved
- Buddy
- providers
- Provider
- id
- name
- canMuc
- canBuddy
- canTopic etc.
- IRC
- onCAP
- onCommand
- onTag
- onISUPPORTs or whatever
- etc.
- XMPP
- I don't know XMPP, just that it has something similar to the CAP system.
- onStanza
- get
- onRegistered
- onUnregistered
- Provider
- accounts
- Account
- id
- providerId
- server
- nickname
- password
- autoJoinedRooms
- create
- update
- query
- remove
- onCreated
- onUpdated
- onRemoved
- Account
- presence
- Presence
- avatar
- status
- statusText
- get
- update
- onUpdated (with reasons like auto idle)
- Presence
- messages
- Message
- id (not sure)
- text
- rawText
- userName
- buddyId?
- participantId?
- incoming
- system
- timestamp
- conversationId
- create
- conversationId
- text?
- raw? (so you can send custom XMPP and IRC etc. payloads)
- query
- conversationId
- buddyId?
- onReceive
- allows filtering/changing a message
- onSend
- ditto
- onCommand
- or should commands be declarative in the manifest.json?
- Message
- menus
- add extra targets for messages, conversations, buddies and participants
- conversations
That's about it for APIs. But as you will notice, nothing about themes, emote sets or new providers in there. That's because that should be statically declared in the manifest.json:
- provider
- name
- icon
- entry_point -> html file that gets special APIs described later on
- capabilities
- topic
- buddy
- muc
- presences
- ?
- setup
- type (oauth vs. pw/login)
- fields
- username
- server
- password
- port
- TLS
- defaults
- defaults for fields -> set OAuth URL here?
- emote_set
- not sure how this'd look. Probably a key value map?
- theme
even less sure how that'd work. In Firefox themes have been abstracted far away from the "bare metal" to essentially CSS var tweaks, which is definitely way less than what chat themes have been able to do. Given the APIs above I think a theme should just be able to do everything themselves, they just provide the HTML file to load in the conversations frame and then there's some API for them to know what conversation they're in and that's about it. Requires it to be the last one to get the events, so probably needs a specific implementation for themes. - permissions
- accounts
- conversations
- messages
- buddies
- providers
- presence
- irc
- xmpp
The provider API
Provider pages would essentially get some additional APIs to either build on top of an existing provider or build their own (and since TCP sockets are not exposed to extensions atm some socket would have to be exposed...)
Not sure if some APIs should be restricted from here, so the socket part can run in its own thread and all the front-end stuff that doesn't actually need the socket would be forced to the classic extension background script and they could communicate by messaging.
The exposed socket things would be classes that could be extended? Not sure. All the events from the other APIs should only be sent for changes coming from outside the provider, so the provicer can use the create, update and remove methods for UI changes.
- providers
- IRC
- XMPP
- Socket
- conversations
- addParticipant
- removeParticipant
- messages
- create
- from
- create
- providerInstance
- setConnectionStatus
- onConnected (user/autoconnect)
- onDisconnected (user disconnect)
- ???? -> probably mostly event handlers -> many type specific handlers are already present in the API above, maybe add shortcuts that don't require filtering for providers
- Ngôn ngữ chính
- JavaScript
- Star
- 33
- Fork
- 18
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của thunderbird/webext-experiments
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Proposal: narrowly scoped account order APICó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
thunderbird/webext-experiments#72 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
thunderbird/webext-experiments#61 · 2 bình luận ·
Tất cả issue của thunderbird/webext-experiments
Issue tương tự
-
bot:ai-assisted component:platform-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
midnightntwrk/platform-js#69 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
awesome-dsh-plugin/awesome-dsh-plugin#16639 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Falló el respaldo diarioĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
manuXD270516/descanso#80 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
needs verification
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 13 ngày