Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change note.user.instance.name with register_note_view_interruptor #15122

Open
1 task
Bananamilk452 opened this issue Dec 12, 2024 · 1 comment · May be fixed by #15123
Open
1 task

Can't change note.user.instance.name with register_note_view_interruptor #15122

Bananamilk452 opened this issue Dec 12, 2024 · 1 comment · May be fixed by #15123
Labels
⚠️bug? This might be a bug

Comments

@Bananamilk452
Copy link

💡 Summary

Can't change note.user.instance.name with register_note_view_interruptor. also something deeper than 2-depth (1-depth note.text is okay).

/// @ 0.12.4
### {
  name: "Show Instance Type"
  version: "0.0.1"
  author: "Bananamilk452"
}


Plugin:register_note_view_interruptor(@(note) {
  if (note.user.instance != null) {
    let softwareName = note.user.instance.softwareName

    note.user.instance.name = `{ note.user.instance.name } ({ softwareName })`
    print(note.user.instance.name)
  }

  return note
})

🥰 Expected Behavior

note.user.instance.name should be changed to { note.user.instance.name } ({ softwareName })

🤬 Actual Behavior

it does not changes.

📝 Steps to Reproduce

  1. Install plugin with that code.
  2. Check the timeline. it doesn't work. but prints correctly in Console.

💻 Frontend Environment

* Model and OS of the device(s): Ryzen 5 7500F, Windows 11
* Browser: Firefox 134.0b8
* Server URL: serafuku.moe
* Misskey: 2024.11.0

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* Misskey:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@kakkokari-gtyih
Copy link
Contributor

instance in MkInstanceTicker is not reactive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
2 participants