Compare commits
No commits in common. "4c0f2346d8ae2cd761c28f1eef4729b95b563445" and "1a7a11eaf340b43b14ad2ccb47107a6a3980353e" have entirely different histories.
4c0f2346d8
...
1a7a11eaf3
23
ROADMAP.md
23
ROADMAP.md
@ -18,12 +18,11 @@
|
||||
* [ ] Message reactions
|
||||
* [x] Read receipts
|
||||
* [x] Power level<sup>[1]</sup>
|
||||
* [ ] Membership actions
|
||||
* [ ] Invite
|
||||
* [ ] Membership actions<sup>[3]</sup>
|
||||
* [ ] Join
|
||||
* [x] Leave<sup>[3]</sup>
|
||||
* [ ] Ban<sup>[4]</sup>
|
||||
* [ ] Unban<sup>[4]</sup>
|
||||
* [x] Leave<sup>[4]</sup>
|
||||
* [ ] Ban<sup>[5]</sup>
|
||||
* [ ] Unban<sup>[5]</sup>
|
||||
* [ ] Room metadata changes<sup>[1]</sup>
|
||||
* [x] Name
|
||||
* [x] Topic
|
||||
@ -52,18 +51,17 @@
|
||||
* [x] On live event
|
||||
* [x] Admin status
|
||||
* [ ] Membership actions
|
||||
* [ ] Invite
|
||||
* [x] Join
|
||||
* [x] Leave
|
||||
* [ ] Self leave
|
||||
* [ ] On backfill
|
||||
* [x] On live event
|
||||
* [x] Kick<sup>[4]</sup>
|
||||
* [x] Unkick<sup>[4]</sup>
|
||||
* [x] Kick<sup>[5]</sup>
|
||||
* [x] Unkick<sup>[5]</sup>
|
||||
* [ ] Channel metadata
|
||||
* [x] Name
|
||||
* [x] Description
|
||||
* [x] Cover photo<sup>[5]</sup>
|
||||
* [x] Cover photo<sup>[6]</sup>
|
||||
* [ ] User metadata
|
||||
* [x] Name
|
||||
* [x] Avatar
|
||||
@ -83,6 +81,7 @@
|
||||
|
||||
<sup>[1]</sup> Sometimes fails with "Invalid body" error
|
||||
<sup>[2]</sup> Only recently-sent KakaoTalk messages can be deleted
|
||||
<sup>[3]</sup> To make your KakaoTalk account leave a channel, send the `leave` command in a Matrix portal room. Simply leaving a Matrix portal room will keep your KakaoTalk account in the channel.
|
||||
<sup>[4]</sup> Kicks in KakaoTalk are equivalent to bans in Matrix
|
||||
<sup>[5]</sup> Might only get synced on backfill, or on changing channel name/description
|
||||
<sup>[3]</sup> KakaoTalk does not support invites
|
||||
<sup>[4]</sup> To make your KakaoTalk account leave a channel, send the `leave` command in a Matrix portal room. Simply leaving a Matrix portal room will keep your KakaoTalk account in the channel.
|
||||
<sup>[5]</sup> Kicks in KakaoTalk are equivalent to bans in Matrix
|
||||
<sup>[6]</sup> Might only get synced on backfill, or on changing channel name/description
|
||||
|
3
SETUP.md
3
SETUP.md
@ -56,11 +56,10 @@ To use them as-is, follow these steps after [initial setup](#initial-setup):
|
||||
1. Copy/link the service files to a directory in the system unit search path, such as `/etc/systemd/system/`
|
||||
1. Create the services' configuration directory with `sudo mkdir /etc/matrix-appservice-kakaotalk`
|
||||
1. RECOMMENDED: Create the `matrix-appservice-kakaotalk` user on your system with `adduser` or an equivalent command, then uncomment the `User` and `Group` lines in the service files
|
||||
* If creating this user, also give it write permissions on the services' configuration directory with `chgrp matrix-appservice-kakaotalk /etc/matrix-appservice-kakaotalk && chmod g+w /etc/matrix-appservice-kakaotalk`
|
||||
* To install as user units:
|
||||
1. Copy/link the service files to a directory in the user unit search path, such as `~/.config/systemd/user`
|
||||
1. Create the services' configuration directory with `mkdir $XDG_CONFIG_HOME/matrix-appservice-kakaotalk`
|
||||
1. Copy/link the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
|
||||
1. Copy the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
|
||||
1. Start the services now and on every boot boot with `[sudo] systemd [--user] enable --now matrix-appservice-kakaotalk{,-node}`
|
||||
|
||||
## Upgrading
|
||||
|
@ -1,2 +1,2 @@
|
||||
__version__ = "0.2.0"
|
||||
__version__ = "0.1.0"
|
||||
__author__ = "Andrew Ferrazzutti <fair@miscworks.net>"
|
||||
|
@ -33,7 +33,7 @@ import asyncio
|
||||
import re
|
||||
import time
|
||||
|
||||
from attr import dataclass, evolve
|
||||
from attr import dataclass
|
||||
|
||||
from mautrix.appservice import IntentAPI
|
||||
from mautrix.bridge import BasePortal, NotificationDisabler, async_getter_lock
|
||||
@ -420,7 +420,7 @@ class Portal(DBPortal, BasePortal):
|
||||
sender_intent = sender.intent_for(self) if sender else self.main_intent
|
||||
admin_level = orig_power_levels.get_user_level(sender_intent.mxid)
|
||||
demoter_ids: list[UserID] = []
|
||||
power_levels = evolve(orig_power_levels)
|
||||
power_levels = PowerLevelStateEventContent(**orig_power_levels.serialize())
|
||||
for user_id, new_level in user_power_levels.items():
|
||||
curr_level = orig_power_levels.get_user_level(user_id)
|
||||
if curr_level < admin_level or user_id == sender_intent.mxid:
|
||||
@ -436,7 +436,7 @@ class Portal(DBPortal, BasePortal):
|
||||
except:
|
||||
self.log.exception("Failed to set power level")
|
||||
if demoter_ids:
|
||||
power_levels = evolve(orig_power_levels)
|
||||
power_levels = PowerLevelStateEventContent(**orig_power_levels.serialize())
|
||||
for demoter_id in demoter_ids:
|
||||
power_levels.set_user_level(demoter_id, user_power_levels[demoter_id])
|
||||
try:
|
||||
|
@ -1009,7 +1009,7 @@ export default class PeerClient {
|
||||
userClient.talkClient.channelList,
|
||||
req.channel_props.type
|
||||
)
|
||||
return await channelList.leaveChannel({ channelId: req.channel_props.id })
|
||||
return channelList.leaveChannel({ channelId: req.channel_props.id })
|
||||
}
|
||||
|
||||
handleUnknownCommand = () => {
|
||||
|
1
setup.py
1
setup.py
@ -63,6 +63,7 @@ setuptools.setup(
|
||||
],
|
||||
package_data={
|
||||
"matrix_appservice_kakaotalk": ["example-config.yaml"],
|
||||
"matrix_appservice_kakaotalk.web": ["static/*", "static/**/*"],
|
||||
},
|
||||
data_files=[
|
||||
(".", ["matrix_appservice_kakaotalk/example-config.yaml"]),
|
||||
|
@ -9,7 +9,6 @@ Type=notify
|
||||
NotifyAccess=all
|
||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk/node
|
||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||
ConfigurationDirectoryMode=775
|
||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json
|
||||
|
@ -7,7 +7,6 @@ After=multi-user.target network.target
|
||||
; Group=matrix-appservice-kakaotalk
|
||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk
|
||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||
ConfigurationDirectoryMode=775
|
||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user